Unloading a table with LOB columns


BMC AMI Unload unloads the base columns and all LOB column data to a VBS file. You can request this format by specifying SPANNED YES. This unload format is compatible with the IBM load utility.

Example
//SYSREC   DD UNIT=SYSDA,DISP=(NEW,CATLG,DELETE),
//            DSN=HLQ.UNLD.LOBTABLE,
//            SPACE=(CYL,(1000,500),RLSE)  
//SYSIN    DD *
  UNLOAD FORMAT DSNTIAUL UNLOADDN SYSREC
       SPANNED YES
       SELECT *
       FROM TABLE OWNRID.Table_With_LOB

This JCL names an unload file to contain both the unloaded base table space data and the associated LOB table space data. Using one SYSREC unload file (as shown above) prevents some parallelism and the use of servers, which spreads the workload and increases processing speed.

Related topic

Considerations when unloading LOB columns 

Remember the following considerations when unloading LOB columns:

  • For UNLOAD with DIRECT YES, if you select LOB columns, either implicitly or explicitly, then you must code SPANNED YES.
  • For UNLOAD with DIRECT NO, if you select LOB columns they are trimmed to fit the maximum LRECL allowed. This is the same behavior as the DSNTIAUL sample program. SPANNED YES is not supported with DIRECT NO.
  • For UNLD with MODE DIRECT, if you select LOB columns, either implicitly of explicitly, then SPANNED YES is optional. If you do not specify SPANNED YES, then only the column data from the base table is unloaded, but not the data in the LOB AUX table spaces.
  • For UNLD with MODE DB2SQL, if you select LOB columns, they are trimmed to fit the maximum LRECL allowed. This is the same behavior as the behavior of the DSNTIAUL sample program. SPANNED YES is not supported with MODE DB2SQL.  


 

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