Can Batch Processor Unload One Row per Record?

Document ID : KB000024129
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction: 

Batch processor uses an unload record length of 72. At times, the table needs to be unloaded one row per record, which means that the record length would be greater than 72.

Question: 

Can Batch Processor Unload One Row per Record?

Answer: 

Batch Processor supplies a keyword that directs the batch processor to unload a table one row per record. The keyword is ROWLEN([F,V]) which will automatically determine the LRECL and BLKSIZE. F is for Fixed Length rows, and V is for Variable Length rows. The ROWLEN keyword can be used inside the .CALL UNLOAD syntax to allow for an LRECL other than 72. The preceding .ALLOC above the .CALL which is included with current Batch Processor UNLOAD model utilities needs to be deleted and, DSN & ALLOCATE parameters need to be added to the .CALL UNLOAD syntax:

.CALL UNLOAD 
.DATA 
  DSN(TSUSER.TSUSER.SYSTABLE.DATA)
  UNIT(SYSDA)
  ALLOCATE(100,60)
  ROWLEN(F)
  SELECT *
  FROM SYSIBM.SYSTABLES
  FOR FETCH ONLY
  ;
  LIMIT(ALL)
.ENDDATA