Previous Topic: $DSCALL OPT=COMPRESS

Next Topic: $DSCALL OPT=COPY


$DSCALL OPT=CONCAT

Concatenates a set of data sets under a single ddname.

&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=CONCAT
             DDLIST=' ddname1, ddname2, ... ddnamen '

This call is used to concatenate two or more ddnames which are allocated to your product region under a single ddname. Each ddname in the list to be concatenated may be a single data set allocation or may itself be a concatenated DD.

Operands:

OPT=CONCAT

Specifies that data sets are to be concatenated.

DDLIST='ddname1, ddname2,...ddnamen '

Specifies the list of ddnames to be concatenated. The DDs are concatenated in the order in which they appear in the list. The resulting concatenated DD is assigned the first ddname in the list. All ddnames in the list other than the first cannot be directly referenced after concatenation has completed. An attempt to directly reference these ddnames will be rejected by the operating system. If the DD is subsequently deconcatenated, the original ddnames is directly referenced again. For more information, see $DSCALL OPT=DECONCAT.

Note: A maximum of 50 ddnames is specified in the DDLIST parameter.

Return Codes:

Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.

Return Variables:

&$DSDYNEC

DYNALLOC error code

&$DSDYNIC

DYNALLOC information code

Example: OPT=CONCAT

EXEC $DSCALL OPT=CONCAT DDLIST='DD1,DD2'

This example concatenates all data sets allocated under the ddname 'DD2' to the 'DD1' DD data set list. The resulting DD is called 'DD1' and the ddname 'DD2' is no longer recognized by the operating system.

Note: Data sets that are concatenated in the JCL for your product region are deemed to be permanently concatenated, which means the DD cannot be deconcatenated. Data sets that are dynamically concatenated by your product region is deconcatenated.