With SMS, use the LIKE or REFDD parameter to copy data set attributes from a model data set:
The LIKE parameter copies the attributes of an existing cataloged data set to the new data set that you are defining on a DD statement.
Use the REFDD parameter to specify attributes for a new data set by copying attributes of a data set defined on an earlier DD statement in the same job.
The following attributes are copied to the new data set from (1) the attributes specified on the referenced DD statement, and (2) for attributes not specified on the referenced DD statement, from the data class of the data set specified by the referenced DD statement:
Data set organization
Record organization (RECORG) or
Record format (RECFM)
Record length (LRECL)
Key length (KEYLEN)
Key offset (KEYOFF)
Type, PDS or PDSE (DSNTYPE)
Space allocation (AVGREC and SPACE)
//STEP01 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IN12 DD DSN=TEST.SYAM.TEST.FILE0,
// DISP=(,CATLG,DELETE),LRECL=80,RECFM=FB,
// UNIT=SYSDA,SPACE=(CYL,(1,5),RLSE)
//OUT2 DD DSN=TEST.SYAM.TEST.FILE2,
// REFDD=*.IN12,DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,5),RLSE)
//OUT1 DD DSN=TEST.SYAM.TEST.FILE,
// LIKE=TEST.SYAM.SPUFI.IN,
// DISP=(,CATLG,DELETE)
Note: DO NOT use LIKE= to model the characteristics of a PDS member coded in JCL, a GDG, or a temporary data set. Also, please note that the EXPDT or RETPD dates are NOT copied by LIKE.
LIKE should not be coded on the same DD statement with the SYSOUT, DYNAM or REFDD parameters. Vsam Files can also be used as model files.
Tuesday, April 27, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment