z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LIKE parameter

z/OS MVS JCL Reference
SA23-1385-00

Parameter type

Keyword, optional — use this parameter only with SMS

Without SMS, use the DCB=dsname form of the DCB parameter described in Subparameter definition.

Purpose

Use the LIKE parameter to specify the allocation attributes of a new data set by copying the attributes of a model data set, which must be an existing cataloged data set and reside on a direct access volume.

The following attributes are copied from the model data set to the new data set:
  • Data set organization
    • Record organization (RECORG) or
    • Record format (RECFM)
  • Record length (LRECL)
  • Key length (KEYLEN)
  • Key offset (KEYOFF)
  • Type, PDS, PDSE, basic format, extended format, large format, or HFS (DSNTYPE)
  • Space allocation (AVGREC and SPACE)

    Unless you explicitly code the SPACE parameter for the new data set, the system determines the space to be allocated for the new data set by adding up the space allocated in the first three extents of the model data set. Therefore, the space allocated for the new data set will generally not match the space that was specified for the model data set. Note that regardless of the units in which the model data set was allocated, the new data set will be allocated in tracks. This assumes that space was not specified on the JCL and is being picked up from the model data set.

    If a data class with OVERRIDE SPACE(YES) is explicitly specified on the JCL, the SPACE attributes in the data class will take president over any other SPACE attributes specified either through JCL or in the modeled data set. See DATACLAS parameter for more details.

    Note: Directory quantity is picked up as part of the space allocation attribute except when the model data set is a PDSE. When you create a PDS, the directory blocks must be specified directly on the JCL by using the SPACE parameter.
There is no requirement that either the new data set or the model data set must be SMS-managed. If the new data set is to reside on tape:
  • The model data set must be a sequential DASD data set
  • Only the record format (RECFM) and the record length (LRECL) attributes are copied to the new data set.

For VSAM data set compression, the LIKE parameter copies existing data set attributes. That is, LIKE processing on a model data set that is compressed will pass the attribute to the new data set. This means that specifying compaction in DATACLAS is not the only way compression can be achieved.

When you specify the LIKE parameter on a JCL DD statement, the SMS read-only variable values that correspond to the attributes copied from the model data set are not available as input to the ACS routines. For more information on SMS read-only variables, see z/OS DFSMSdfp Storage Administration.

If SMS is not installed or is not active, the system syntax checks and then ignores the LIKE parameter.

The retention period (RETPD) or expiration date (EXPDT) is not copied to the new data set.

Note: Do not use the LIKE parameter to copy attributes from a temporary data set (&&dsname), partitioned data set if a member name is included, and relative generation number for a GDG.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014