Generating LOAD statements


During the Unload utility process, you can automatically generate LOAD statements to a defined SYSCNTL or SYSPUNCH DD card when you specify certain values for the FORMAT option. The UNLOAD keyword uses SYSCNTL as the default DD name. The UNLD keyword uses SYSPUNCH as the default DD name. You can then use the resulting statement to reload data in another job.

The following table lists format specifications which allow Unload to generate LOAD statements in a SYSCNTL or SYSPUNCH DD:

FORMAT keyword

Generates a LOAD statement in a SYSCNTL or SYSPUNCH DD?

ASCIIDEL

This value is valid only with UNLD.

No

DELIMITED

This value is valid only with UNLD.

Yes

Yes

Yes

No

To statically allocate the data set

You can provide a data set name to the DD statement. 

Example
//SYSCNTL DD SYSOUT=*

or

//SYSCNTL DD DISP=SHR,DSN=NGT.UNLOAD.AUTO.GENERATE

To override the SYSCNTL DD name default, use the CNTLDDN keyword in the UNLOAD command.

To override the SYSPUNCH DD name default, use the STMTDDN keyword on the UNLD command.

For more information see, SYSCNTL and SYSPUNCH DD statements.

To dynamically allocate the data set

Instead of providing a data set name with the DD statement, you can dynamically allocate the data set by using one of the following methods. If you dynamically allocate the data set, the value of the OVERRIDEOUTPUT parameter determines the method that BMC AMI Unload uses.

If SYSCNTL, SYSPUNCH, or an alternative DD is not allocated, BMC AMI Unload assumes that you want to bypass generation of the LOAD statement and does not issue an error message.

Important

When BMC AMI Unload encounters a SELECT clause containing an expression instead of a column name (for example, X'ABCD', FLOAT(COL02), or SUBSTR(COL01,1,COL02)), BMC AMI Unload generates a name in place of an expression in the generated LOAD statement. For example, if BMC AMI Unload encounters:

    UNLOAD FORMAT EXTERNAL

  SELECT COL01, FLOAT(COL02) FROM ...

BMC AMI Unload creates the following fields in the generate LOAD statement:

  ( "COL01" POSITION(1:1) CHAR(1)
  ,"EXPRSN_00002" POSITION(2:25) FLOAT EXTERNAL(24) 
  NULLIF(26)=X'6F' )

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*