DocBag

Back Issue

Creating VSAM datasets in Batch

Here is an example using JCL to create a VSAM KSDS: // SET DAT=D020504 // EXEC PGM=IEFBR14 //DD1 DD DSN=&SYSUID..&DAT..VSAM,DISP=(,CATLG), // UNIT=DISK, // RECORG=KS,KEYOFF=0,KEYLEN=14,LRECL=200, // SPACE=(80,(10,10)),AVGREC=K Here is a simpler example using the LIKE keyword to copy attributes from an existing VSAM dataset: // SET DAT=D020504 // EXEC PGM=IEFBR14 //DD1 DD DSN=&SYSUID..&DAT..VSAM,DISP=(,CATLG), // LIKE=&SYSUID..MODEL.VSAM On the plus side, the dataset can be named and some attributes assigned using JCL symbolics. However, you cannot specify important performance-related attributes such as buffer sizes and not all attributes are propogated using LIKE.

Here is a example using TSO in batch. See Email notification from Batch Jobs for more information on the TSOBATCH procedure:

// SET DAT=D020504 //S0 EXEC TSOBATCH, // PARM='DEF CLUSTER (NAME(&DAT..TEST) MODEL(MODEL.VSAM))' //SYSTSIN DD DUMMY This is using the TSO DEFINE command to copy the attributes from a model dataset. More complex examples can be implemented using the techniques described in Generating Control Cards.

Feedback

Comments or suggestions can be sent to the author.

Last Month's Topic

Big Iron