The order of precedence for data class attributes in JCL is as follows:
//DD1 DD ...,DATACLAS=DC2,RECORG=ES,...
//DD2 DD ...,DATACLAS=DC1,LRECL=180,REFDD=DD1,...
For
the
attributes for DD2, LRECL of 180 is used first, and then the RECORG
of ES in DD1 is used, regardless of the values specified in either
the DC1 or the DC2 data class. For the remaining attributes that are
not explicitly specified on the DD statements, SMS uses the values
defined in the data class definition of DC2 and then DC1.//DD3 DD ...,DATACLAS=DC3,LRECL=180,LIKE=SAMPLE.DATA,....
Here,
an LRECL of 180 is used. Then, SMS uses the Data Set Control Block
(DSCB) information from the SAMPLE.DATA data set. Finally, the remaining
attribute values are drawn from the DC3 data class.//DD4 DD ...,DATACLAS=DC4,...
//DD5 DD ...,DSN=DS1,REFDD=DD4,DATACLAS=DC5,LRECL=180,...
In
this example, the REFDD keyword specifies that the explicit attributes
on the DD4 JCL statement are to be used second, because explicit attributes
on the DD4 JCL statement are used after the explicitly specified attributes.
Next, the attributes from data class DC4 referenced in DD4 should
be used. The remaining attributes are taken from data class DC5.For more information on using the LIKE and REFDD keywords, refer to z/OS MVS JCL Reference. For information on determining data classes through ACS routines, see Defining ACS routines. For information on access method services DEFINE defaults and data class defaults, refer to z/OS DFSMS Access Method Services Commands.