Using DATACLAS and LIKE Keywords

You can use the DATACLAS and LIKE keywords in the DD statement for both system-managed and non-system-managed generation data sets. For non-system-managed generation data sets, DATACLAS and LIKE can be used in place of a model DSCB. The data sets can be on either tape or DASD. See z/OS DFSMS Using Magnetic Tapes about using data class with tape data sets.

The LIKE keyword specifies the allocation attributes of a new data set by copying the attributes of a cataloged model data set. The cataloged data set referred to in LIKE=dsname must be on DASD.

Recommendation: You can still use model DSCBs if they are present on the volume, even if LIKE and DATACLAS are also used for a non-system-managed generation data set. If you use model DSCBs, you do not need to change the JCL (to scratch the model DSCB) when migrating the data to system-managed storage or migrating from system-managed storage. If you do not specify DATACLAS and LIKE in the JCL for a non-system-managed generation data set, and there is no model DSCB, the allocation fails.

An example of allocating a non-system-managed generation data set by supplying its DCB attributes using DATACLAS and LIKE follows. This example would also work for system-managed generation data sets.
   //DDNAME DSN=HLQ.----.LLQ(+1),DISP=(NEW,CATLG),DATACLAS=dc_name
 
   //DDNAME DSN=HLQ.----.LLQ(+1),DISP=(NEW,CATLG),LIKE=dsn

For more information on the JCL keywords used to allocate a generation data set, see z/OS MVS JCL Reference.

The new generation data set is cataloged at allocation time, and rolled into the GDG at the end-of-job step. If your job ends after allocation but before the end-of-job step, the generation data set is cataloged in a deferred roll-in state. A generation data set is in a deferred roll-in state when SMS does not remove the temporary catalog entry and does not update the GDG base. You can resubmit your job to roll the new generation data set into the GDG. For more information about rolling in generation data sets see Rolling In a Generation Data Set.