Use of &COPY for the data set name


To help define dynamic allocation skeletons for log data sets that are defined as GDGs, BCF provides the substitution keywords &COPY and &COPYn.

&COPY is used as the data set name. &COPYn is used to construct the data set name. These special keywords instruct BCF to copy the data set name from the current log data set specified in the JCL as the foundation for the log data set name to be allocated. If you want the new log data sets for log recovery or batch backout to use the same GDG base as the corresponding log data set provided in the job step JCL, using &COPY in the dynamic allocation skeleton causes BCF to use the existing GDG base when allocating new log data sets.

The &COPY keywords allow you to define a minimum number of dynamic allocation skeletons for use with GDGs. This technique may be especially useful in certain instances and may even be necessary if multiple job steps within a job create IMS log data sets. It is your responsibility to ensure that a GDG base exists for the resulting data set name when using &COPY keywords.

You can request that BCF use a GDG increment by specifying &COPY (or &COPYn) (+i) where i represents the number to increment the generation by. If the current log data set in your JCL is a GDG and you specify &COPY with no increment, BCF defaults to &COPY (+1).

Note

The use of the &COPY keyword is not restricted to GDG log data sets but can result in duplicate data set names if used with non-GDG log data sets since the same name would be used for both recovery and backout log data sets. This condition may, in turn, result in a NOT CATLG 2 error.

If &COPYn and &COPY are mixed, the keywords are resolved as indicated, but the data set name constructed may exceed the maximum allowed for a data set.

If the data set name of the existing log DD statement in the JCL does not contain a node in the position indicated, no value is substituted for the copy node (&COPYn) keyword.

The copy node keywords can be specified in any order and can be repeated, if necessary.

If no data set name is associated with the log DD statement being allocated, the following values are used as the first four nodes of the data set name:

&JOBNAME.COPY.&DAY.&TIME

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*