Reusing work files

To reuse a work file in the z/OS Batch Command Server, you must code a DD statement in the JCL, allocating the work file as a cataloged dataset. Only input work files can be reused.

The DDNAME for the work file to be reused must be a concatenation of up to five characters of the map name, followed by the IW string , followed by the number of the work file. The number of the work file corresponds to the number of the input card. For example, if you are executing a map called MYMAP and you want to reuse the work file for input card number three, code a DD statement with the following DDNAME:MYMAPIW3.

Work file DCB parameters should define a file with fixed-blocked standard (FBS) records. The disposition should be (MOD,CATLG,DELETE). Using MOD will ensure that if the file does not exist, it will be created. Using CATLG may cause the message NOT RECATLGD 2 to appear in the output JES log, but this message can be safely ignored. The BUFNO parameter should not be used.

The following example DD statement demonstrates how you can reuse the work file for input card number 1 of a map named MYMAP:

//MYMAPIW1 DD  DSN=name,
//             DISP=(MOD,CATLG,DELETE),
//             DCB=(LRECL=23476,RECFM=FBS),
//             UNIT=unit,
//             SPACE=(space)