compliances , o-s

JCL Coding Examples

January 19, 2015

Coding  examples for “DISP=SHR”  or  “DISP=OLD”  for all datasets  (any label). 

//{yourdd} DD DSN={your.dataset.name}, 

//            DISP={SHR|OLD} 

Unit affinity example: 

//{yourdd1} DD DSN={your.dataset.name1},DISP={SHR|OLD} 

//{yourdd2} DD DSN={your.dataset.name2},DISP={SHR|OLD},UNIT=AFF={yourdd1} 

//{yourdd3} DD DSN={your.dataset.name3},DISP={SHR|OLD},UNIT=AFF={yourdd2}

Unit affinity example (concatenation):

//{yourdd1} DD DSN={your.dataset.name1},DISP={SHR|OLD}

//          DD DSN={your.dataset.name2},DISP={SHR|OLD},UNIT=AFF={yourdd1}

//          DD DSN={your.dataset.name3},DISP={SHR|OLD},UNIT=AFF={yourdd1}

Coding example for VSAM “DISP=NEW”:

The CISIZE for your dataset will be calculated by the system to give you optimal DASD utilization which may not be the best CISIZE for performance. For this reason we do not recommend this allocation method for online databases.

//{yourdd} DD DSN={your.cluster.name},

//            DISP=(NEW,CATLG),

//            SPACE={(reclgth,(primqty,secqty))},AVGREC={U|K|M},

//            LRECL={nnnnn},

//            RECORG={KS|ES|RR|LS},

//***         if recorg=ks then you must include: KEYLEN={nnn},KEYOFF={nnnnn},

//            UNIT=DISK,

//            MGMTCLAS={bestmgmt},

//            VOL=SER={genvol}

//***        one of the following may be used for space and attribute info:

//            DATACLAS={bestdata} 

Coding example for  non-VSAM and non-ISAM with “DISP=NEW”:

 //{yourdd} DD DSN={your.dataset.name},

//            DISP=(NEW,CATLG),

//            SPACE={(reclgth,(primqty,secqty{,dirqty}))},AVGREC={U|K|M},

//            LRECL={nnnnn},

//            RECFM={aaa},

//            DSORG={aaa},

//            UNIT={DISK|TAPE},

//            MGMTCLAS={bestmgmt},

//***         if unit=tape and label>1 then must code: LABEL={nnnn},

//***                                                : VOL=REF={prev-label-dd},

//***         one of the following may be used for space and attribute info:

//***         DATACLAS={bestdata}