Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : UNLOAD_DATA

UNLOAD_DATA
Unloads the data of a table to a z/OS data set or a Windows or Solaris file. (C)
Invocation
CALL UNLOAD_DATA(tablespec, selection, location)
 
Prerequisites
You must call @OPENDSN before you call UNLOAD_DATA. After calling @OPENDSN, you can make multiple calls to UNLOAD_DATA.
Usage Notes
UNLOAD is the interactive version of this tool.
Parameter values must be specified in the tablespec argument rather than the selection argument. The tablespec must specify a value for each parameter of a parameterized table.
You can call UNLOAD_DEFN within the same rule.
If you specify an empty string for select, all occurrences are unloaded from the table, provided the table is non-parameterized or only a single instance is specified.
The syntax for select is <field name> <relational operator> <value>.
Specify a value for location only if the data is located on a different node.
If UNLOAD_DATA is executed using the EX option from the workbench, the search path used for event rules is local, the installation library, and then COMMON. If UNLOAD_DATA is executed using the LO or UL options from the @ADMIN menu, the search path is COMMON since the search path is indicated in @MENU_ITEMS(@ADMIN) as S.
If you are using FTP to transfer unloaded data between z/OS and Windows, Solaris, or UNIX, it is no longer mandatory to use the S6BBRFRU z/OS utility before the data can be used by TIBCO Object Service Broker. Refer to TIBCO Object Service Broker for z/OS Utilities for more information about S6BBRFRU.

Exceptions
 
Raised if invalid values are specified for tablespec, selection, or location. It is also raised if you do not have security access to the data or definition of the table or table instance.
Examples
The following rule unloads data from two tables. Data is unloaded from an instance of the EMPLOYEES table and from a different node than your default node location for the MANAGERS table.

 
RULE EDITOR ===> SCROLL: P
UNLOAD_DATA_1;
_ LOCAL UNLOAD_MSG;
 _ ------------------------------------------------------------+--------------
_ ------------------------------------------------------------+--------------
_ CALL @OPENDSN('USR40.UNLOAD.HURON(DATA)'); | 1
_ CALL UNLOAD_DATA('EMPLOYEES(CANADA)', '', ''); | 2
_ CALL UNLOAD_DATA('MANAGERS', '', 'NODE3'); | 3
_ ---------------------------------------------------------------------------

 
The following rule unloads the data from all instances of the table EMPLOYEES by using a FORALL loop on the $EMPLOYEES parameter value table:

 
RULE EDITOR ===> SCROLL: P
UNLOAD_EMPS;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ CALL @OPENDSN('EMPS.DATA.OUT'); ¦ 1
_ FORALL $EMPLOYEES : ¦ 2
_ CALL UNLOAD_DATA('EMPLOYEES(' || $EMPLOYEES.REGION || ¦
_ ')', '', ''); ¦
_ END; ¦
_ CALL @CLOSEDSN; ¦ 3
_ ---------------------------------------------------------------------------

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved