Allocating the image copy data set
BMC recommends dynamic allocation because of the flexibility and improved control that it provides.
Using JCL to allocate the image copy data set
Use the DDNAME keyword to indicate that the image copy data set is allocated using JCL DD statements.
The example below shows the request to make an image copy of an area. The output image copy is written by the DD statement named icddname that is supplied in the JCL.
//PFP EXEC PGM=PFPMAIN,REGION=0M //STEPLIB DD DISP=SHR,DSN=BMC.PFP.LOAD // BMC.ICP.LOAD,DISP=SHR // DD DISP=SHR,DSN=IMS.RESLIB //icddname DD UNIT=TAPE,DISP=(NEW,CATLG), // DSN=your.dataset.name //PFPSYSIN DD * ANALYZE DBD=dbdname,IAREA=areaname IC DDNAME=icddname /*
When using JCL to allocate the output image copy, you should ensure that only one area is written to any DD statement. If more than one area is written to the same DD statement, the image copy of the second area overwrites the image copy of the first area.
Using dynamic allocation for the image copy data set
Use the DSNAME keyword to indicate that the image copy data set is to be dynamically allocated and to supply a mask for constructing the data set name.
Substitution variables within the mask can be used to generate unique names for each output data set.
Additional keywords such as UNIT, DISP and DATACLAS can be used to control the allocation and disposition of the data set, similar to the corresponding JCL keywords.
The example below requests the creation of a single output image copy data set for each area (using the default IAREA=ALL) within the database. Each image copy data set is written to a tape device and recorded in the system catalog.
REORGANIZE DBD=dbdname IC DSNAME='dataset-name-mask', DISP=(NEW,CATLG),UNIT=TAPE
The data set name that is specified with the DSNAME keyword can refer to a generation data group (GDG). Code the DSNAME keyword to specify the base name for the GDG. You can include the (+1) relative generation number as part of the DSNAME keyword.
The example below uses a DSNAME keyword to refer to a GDG.
REORGANIZE IC DSNAME='dataset-name-mask(+1)', DISP=(NEW,CATLG),UNIT=TAPE
If you do not specify the (+1) relative generation number, the product automatically appends the incremented (+1) generation number to the data set name if it is recorded in the system catalog as a GDG base name.