Using the STACK keyword (stacking image copy data sets)

If the STACK keyword is specified, output image copy data sets are created as stacked data sets.

When stacking is requested with the STACK keyword, the IMS HP Image Copy function groups the output image copy data sets with the ddname specified for the STACK keyword. The grouped output image copy data sets are written into the same tape volume or set of tape volumes identified with the stacked data set.

Output stacked image copy data sets are always allocated dynamically, even when ICDALLOC=N parameter is specified.

IMS HP Image Copy uses a stacked data set to identify each stack. It writes the stacked data set at the beginning of the tape volume or volumes, and the stacked image copy data sets follow one by one as separate data sets on the tape volume or volumes. Every output stacked image copy data set is dynamically allocated.

When the stack data set is requested, IMS HP Image Copy dynamically allocates a dummy data set first. The dummy data set is not allocated for the real data set, but it is used for controlling the stacking of the data sets internally. If you control the data set name by using the tape control program, you need to take the dummy data set into consideration.

If a data set naming template is not defined, the name of the output image copy data set is determined as follows:
ichlq.ICn.dbdname.ddname
where:
ichlq
The value specified for the ICHLQ keyword.
n
1 or 2, indicating primary or secondary copy.
dbdname
The DBD name or partition DBD name of the database to be copied.
ddname
The DD name of the target data set group or area to be copied.
yyddd
Date.
hhmmss
Time stamp.

STACK=ddname

The stacked data set is identified by the ddname specified by the STACK=ddname keyword. If you provide a corresponding DD statement for the ddname specified for the STACK keyword, IMS HP Image Copy uses that DD for the stacked data set. If the corresponding DD is not found, IMS HP Image Copy dynamically allocates the stacked data set.

If you specify the STACK keyword with a specific ddname as, for example:

   IC DBD=HDAMDB1,DDN=HDAMDD1,STACK=STACK1
   IC DBD=HDAMDB2,DDN=HDAMDD2,STACK=STACK2
   IC DBD=HDAMDB3,DDN=HDAMDD3,STACK=STACK1

IMS HP Image Copy stacks image copy data sets into the corresponding DD name data set of STACK=ddname.

IMS HP Image Copy dynamically allocates the output image copy data set. You can supply the data set allocation attribute by supplying option parameters in the ICEIN control statement or the DD card associated the DD name.

If the DD statement for the stacked data set is present in JCL, the Image Copy function no longer uses the allocation information for output image copy data sets that is specified by the ICEIN control statements. The Image Copy function uses the volume information of the stacked data set when allocating subsequent stacked image copy data sets.

The following DD statement must be provided when you use DD allocation for a stacked data set:

   //ICEIN DD *
   IC DBD=...,DDN=...,STACK=STACK1
   IC DBD=...,DDN=...,STACK=STACK1
   /*
   //STACK1 DD UNIT=TAPE,DSN=anyname,
   //          DISP=(NEW,KEEP),VOL=(,,,99),
   //          LABEL=RETPD=60

You must supply all pertinent information by coding the appropriate JCL parameters on the DD statement, such as LABEL, UNIT, and VOL. The DSN parameter in a DD card is used as a dummy file for controlling a stack. The data set is allocated once, but it is not used for a real data set. The real data set must be named by the IMS HP Image Copy naming convention.

The files are stacked in the image copy data set as follows:

  • ICEIN control statement
  • DBDSs registered in the CA and DBDS groups
  • DBDSs registered in the DBD

For example, if you specify the following ICEIN control statements:

   //ICEIN DD *
   GROUP CAGRP=PAYROLL,FUNC=IC,STACK=STACK1
   IC    DBD=HDAM00,STACK=STACK1
   IC    DBD=HDAM01,DDN=HDAM01D1,STACK=STACK1
   /*

and assuming that:

  • CA group PAYROLL contains three DBDSs: DBDSA, DBDSB, and DBDSC
  • HDAM00 contains two DBDSs: HDAM00D1 and HDAM00D2
  • HDAM01 contains one DBDS: HDAM01D1

The file sequence numbers assigned to the stacked data sets are as follows:

     Stacked data set                   
     CA GROUP=PAYROLL,DBDS=DBDSA        FILE=1
     CA GROUP=PAYROLL,DBDS=DBDSB        FILE=2
     CA GROUP=PAYROLL,DBDS=DBDSC        FILE=3
     DBD=HDAM00,DBDS=HDAM00D1           FILE=4
     DBD=HDAM00,DBDS=HDAM00D2           FILE=5
     DBD=HDAM01,DBDS=HDAM01D1           FILE=6

STACK=*

The IMS HP Image Copy dynamically allocates output image copy data sets regardless of the ICDALLOC parameter. If you specify STACK=*, IMS HP Image Copy allocates output data sets for the specified number of tasks.

For example:

GLOBAL TASKCTL=3,STACK=*
AIC DBD=DBD1,DDN=DBDS1
AIC DBD=DBD2,DDN=DBDS2
AIC DBD=DBD3,DDN=DBDS3
AIC DBD=DBD4,DDN=DBDS4
AIC DBD=DBD5,DDN=DBDS5

In this example, IMS HP Image Copy processes five DBDSs with three tasks (TASKCTL=3) in an IMS HP Image Copy job. IMS HP Image Copy allocates one output tape unit for each task, to which processes DBDS1, DBDS2, and DBDS3 are written. The output image copy data sets for each DBDS are stored in different tape units. When the image copy process for DBDS2 ends, IMS HP Image Copy starts processing DBDS4 and stacks its output to the same tape as DBDS2.

Another example:

GROUP FUNC=AIC,CAGRP=CAGRP1,STACK=*,GRPLIM=2 

When five data sets are registered to CAGRP1, the Image Copy function dynamically allocates two outputs (GRPLIM=2) for output image copy and stacks five data sets to these DDs. In this case two tape units are required when two tasks are scheduled.

STACK=* helps to reduce run time and is easy to control STACK in your JCL.

If you use STACK=* in a parallel process, control the number of tasks with the GRPLIM keyword for the GROUP statement or the TASKCTL keyword. Otherwise, all processes for DBDSs will run in parallel and each output data set will be stored in different tape units and volumes.

Note: STACK=* in an nonparallel process (IC/CIC) causes all image copy data sets of the processed DBDS in a job to be stored on one tape.

OFFLDSTACK=ddname|*

When creating Fast Recovery image copies by using the FASTIC=(,COPY) keyword, the primary image copy data set must be created on DASD, and you cannot specify the STACK keyword. Instead, you can use the OFFLDSTACK keyword to create secondary image copy data sets as stacked image copy data sets. In this case, you also need to specify the ICOUT=(,%STACK) and OFFLDTYPE=S keywords.

To control the output stack data sets in the same manner as using STACK=ddname, specify OFFLDSTACK=ddname.

To have IMS HP Image Copy assign the output stack data sets as in the same manner as using STACK=*, specify OFFLDSTACK=*.

Naming convention

When stacking is used, the Image Copy function always dynamically allocates stacked image copy data sets. The Image Copy function uses the allocation information inherited from the stacked data set. The data set name for each stacked image copy data set is constructed as follows:

ichlq.ICn.dbdname.ddname.Dyyddd.Thhmmss

where:

ichlq
The value specified for the ICHLQ keyword.
n
1 or 2, indicating primary or secondary copy.
dbdname
The DBD name or the partition DBD name of the database to be copied.
ddname
The DD name specified in the STACK keyword.
yyddd
Date.
hhmmss
Time stamp.
Note: You can change the data set naming convention by using the data set naming template.

When the stacked data set is requested, IMS HP Image Copy dynamically allocates a dummy data set first. The dummy data set is not a real data set, but its allocation information is used internally for control. If you control the data set name by using the tape control program, you need to take the dummy data set into consideration. The name of the dummy data set is determined as follows:

  • If STACKBASE=REAL is applied, the actual data set name of the output image copy that is generated with the naming convention is used.
  • If STACKBASE=TEMP is applied, the name of the dummy data set is as follows:
    DSN=ichlq.ddname.job-no.Thhmmss
    where:
    ichlq
    The data set name prefix specified for the ICHLQ keyword.
    ddname
    The ddname specified for the STACK keyword.
    job-no
    The job number of the IMS HP Image Copy execution job.
    hhmmss
    Time stamp.

When stacking is used, the Image Copy function dynamically allocates a stacked data set by using the allocation information specified by the ICEIN control statements.

The following keywords are effective for each stacked image copy data set only when they are specified in the GLOBAL statement. If they are specified in any statement other than the GLOBAL statement, they are ignored.

UNIT keyword
UNIT=icunit

where icunit is the unit name.

VOL keyword
VOL=(,,,volcnt,SER=(ser1,ser2,...))

where:

volcnt
The volume count.
ser1, ser2 ...
The volume serial numbers.
EXPDT keyword
EXPDT2 keyword
EXPDT=expdt or RETPD=retpd
EXPDT2=expdt or RETPD2=retpd

where:

expdt
The expiration date.
retpd
The retention period.
DATACLAS keyword
DATACLAS2 keyword
DATACLAS=data_class_name
DATACLAS2=data_class_name

where data_class_name is the name of the data class.

MGMTCLAS keyword
MGMTCLAS2 keyword
MGMTCLAS=management_class_name
MGMTCLAS2=management_class_name

where management_class_name is the name of the management class.

STORCLAS keyword
STORCLAS2 keyword
STORCLAS=storage_class_name
STORCLAS2=storage_class_name

where storage_class_name is the name of the storage class.

The Image Copy function uses the volume information of the dynamically allocated stacked data set when allocating subsequent stacked image copy data sets.

Note: The disposition parameter for each stacked image copy data set is DISP=(NEW,KEEP).