JCL

HI

Can you please give ma a small example how to create a JCL to create the work datasets using NAt/ADAB

Assuming you’re on MVS (or OS/390 or zOS), it might look like:

//CMWKFnn DD DSN=dsname,DISP=(,CATLG),
//  SPACE=(space parameters),DSORG=PS,RECFM=recfm,LRECL=lrecl

where nn is the number from your WRITE WORK statement, and space parameters, recfm, and lrecl depend on how much data you have, the record format, and your logical record length. For example, if your NATURAL program says:

WRITE WORK FILE 1 #MYDATA

and #MYDATA is 400 bytes long, and you’re expecting to write about 10000 records, you might have JCL like:

//CMWKF01 DD DSN=MY.DATA,DISP=(,CATLG),DSORG=PS,
//    RECFM=FB,LRECL=400,AVGREC=K,SPACE=(400,(10,1))

If your storage administrator has defined an appropriate DATACLAS, you could use that to specify DSORG, RECFM, LRECL, AVGREC, and SPACE in a single parameter.