XCPYDYNM (dynamic image copy data set allocation) automation control point
Use the XCPYDYNM automation control point to control the following aspects of the image copy process:
- Whether to exclude the copying of a particular object (if it matches a wildcard naming pattern)
- Whether to perform a full image copy as opposed to an incremental one
- The name of the image copy data set
The automation control point uses the following process:
- Defines a data set with the requested name.
- Deletes the image copy by setting DISP to D (not performed with BMC AMI Reorg).
- Switches to a new tape volume by setting FSEQ to a value of 1 (not performed with BMC AMI Reorg).
The product invokes this automation control point as each table space is selected for image copy processing. (For tape copies, DD names and drives have already been determined at this point). (SPE2005) The XCPYDYNM is not invoked if +OVERRIDEOUTPUT(NO) and the OUTPUT statement is complete.
Variables
The following table describes the variables used in the XCPYDYNM automation control point:
Variable name | Contents | Possible values |
---|---|---|
changed | Total number of 4-KB pages that have been modified since the last copy, provided that real-time statistics are available for the table space This field is derived from the COPYUPDATEDPAGES column of the SYSTABLESPACESTATS table. | Not applicable |
changes | An indicator of whether rows have been changed since the last copy, provided that real-time statistics are available for the table space This field is derived from the COPYCHANGES column of the SYSTABLESPACESTATS table. |
|
cpyddnam | Value of the COPYDDN or RECOVERYDDN keywords of the COPY utility statements This is not the ddname that the utility writes to SYSCOPY. | Not applicable |
dataclas | SMS data class | Not applicable |
dbname | Database name as it appears on the COPY statement | Not applicable |
disp | Disposition for the image copy data set |
|
dsname | Image copy data set name This variable is required. | Not applicable |
dsnum | Data set number (partition number) as it appears on the COPY statement | 0 or a positive integer representing the partition number If DSNUM ALL is specified, this value is 0. |
dstype | Table space type |
|
empty | Number of empty 4-KB pages | Not applicable |
expdt | Expiration date for the image copy | A value in the format YYYYMMDD |
from_ic | If copying FROMSYSCOPY, the 44-byte data set name of the source image copy Otherwise, the value is blank. | Not applicable |
fseq | Tape file sequence number | Set to 1 to start a new volume |
full | Type of image copy as specified on the COPY statement |
|
full_days | Number of days since the last FULL YES image copy as recorded in SYSIBM.SYSCOPY | 0 through 255 If restrict=Y, then full_days=0. |
full_hours | Number of hours since the last FULL YES image copy as recorded in SYSIBM.SYSCOPY | 0 through 255 If restrict=Y, then full_hours=0. |
function | Name of the utility that is about to be processed |
|
gdglimit | Number passed as the LIMIT keyword of a DEFINE GDG AMS command (for a GDG data set for which a GDG base does not exist) | Not applicable |
icbackup | Image copy backup type This type corresponds to the COPYDDN or RECOVERYDDN DD statements. |
|
incr_count | Number of successive incremental image copies recorded in SYSIBM.SYSCOPY since the last full copy of the table space being processed | 0 through 255 If restrict=Y, then incr_count=0. |
ixname | Name of the index being copied, in the form creator.ixname | Not applicable |
lpart | Logical partition number for the copy DB2 posts copies to SYSIBM.SYSCOPY based on the physical partition number rather than the logical partition number. The user makes all specifications based on the logical partition number. The automation control point sets the dsnum variable to the physical partition number. | Not applicable |
maxvol | For DASD allocation, the number of volumes used to satisfy the original space request in excess of 500 cylinders The maximum value is 59. | The primary variable divided by 500, rounded up to the next whole number For example, for a data set with a size of 2100 cylinders, maxvol would be 2100 divided by 500 (4.2), rounded up to 5. |
media | Type of media in use You cannot change this variable. |
|
mgmtclas | SMS management class | Not applicable |
otype | Object type being copied |
|
pagesize | Size of a data page, expressed in kilobytes | Positive integer followed by K |
parts | Total number of partitions in the table space | 0 or a positive integer 0 indicates that an object is not partitioned |
ppart | Physical partition number DB2 posts copies to SYSIBM.SYSCOPY based on the physical partition number rather than the logical partition number. The user makes all specifications based on the logical partition number. The automation control point sets the dsnum variable to the physical partition number. | Should always match the value of dsnum |
primary | For DASD allocation, the primary space allocation to use | Not applicable |
rc | Return code for this automation control point | SeeReturn codes |
restrict | Whether the current object is in a DB2 restricted state |
|
retpd | Retention period, in days | Not applicable |
secondary | For DASD allocation, the secondary space allocation to use When the automation control point receives control, the value for this variable is half the value of the primary variable. The value for this variable must be greater than 0. A value of 0 produces unpredictable results. | Not applicable |
shrlevel | Access mode as specified on the COPY statement |
|
size | Total number of 4-KB pages in the table space, obtained from the high-used RBA (HURBA) of the VSAM data set for the table space If the dsnum variable is 0 and the parts variable is not 0, the size variable will contain the sum of the HURBAs from all partitions. | Not applicable |
spaceunit | Space allocation unit of the primary and secondary variables This variable is set to cylinders if the primary variable is greater than 10 cylinders; otherwise spaceunit is set to tracks. If you require allocations in blocks, use the XSUTDYNM automation control point instead of the XCPYDYNM automation control point. |
|
stmt | SYSIN statement number | Not applicable |
storclas | SMS storage class | Not applicable |
tapedd | DD name for the tape unit, if applicable You cannot change this value. | Not applicable |
tsname | Name of the table or index space being copied | Not applicable |
tstype | Type of table space being copied |
|
unitname | Name of the image copy unit You cannot change this value. | Not applicable |
vcatname | High-level qualifier for the object being processed | Not applicable |
Return codes
The XCPYDYNM automation control point returns the following return codes:
Return code | Description |
---|---|
0 | (default value) Signifies normal completion No action is required. |
Any other value | Abnormal termination Set the return code to any non-zero value to cancel the entire job. |
Restrictions
The BMC AMI Utilities products support only dynamic allocation of copy data sets. If you specify copy DD statements in your JCL, the BMC AMI Utilities products ignore them.
Additional considerations
Review the following information before using this automation control point.
Additional variable information |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
DASD allocation | When the value of the media variable is D, the automation control point performs DASD allocation.
| ||||||||
Tape or VTS allocation | The automation control point performs tape or VTS allocation when the value of the media variable is T. You cannot include the DISP and DSNAME parameters on your DD statement. The DD name can be any name. All other DD parameters are valid. For example: //DD1 DD UNIT=(TAPE,,DEFER),VOL=PRIVATE //DD2 DD UNIT=(TAPE,,DEFER),VOL=PRIVATE
| ||||||||
Managing the DB2 catalog | Some of the variables in this automation control point are set based on analysis of the SYSIBM.SYSCOPY DB2 catalog table. XCPYDYNM can use these variables to determine whether to perform a full or incremental copy. The key variable to watch is restrict. When restrict is Y, it indicates that a full copy is required and that an incremental copy is not allowed. When restrict is N, you can use other variables to determine whether you want an incremental copy. This determination is based solely on the number of days since the last full image copy (indicated by the full_days variable). If the last copy was a FULL YES copy and the table space is not in COPYP state, then restrict is set to N, and full_days is the number of days between the last image copy and the day of the current run. If the table space is in COPYP, or if no full image copy exists in the DB2 catalog (as specified with FULL YES), then DB2 requires that a full image copy be taken. In this case, the value of restrict is Y and full_days is 0. If the table space is not in COPYP, and the latest image copies are incremental copies (as specified with FULL NO), then the value of restrict is N and full_days contains the number of days between the last full image copy and the current date. | ||||||||
MVS catalog | How image copies are cataloged in the MVS catalog is extremely important when using tape for copies (and to a lesser extent when using DASD). The BMC AMI Utilities copy function provides some significant facilities that might affect how you design your XCPYDYNM automation control point. When using tape for copies, consider the following issues:
When referring to cataloguing image copy data sets, it does not matter whether the reference is to the DB2 catalog or the MVS catalog. If the copies are cataloged in the MVS catalog, the way SYSIBM.SYSCOPY is updated changes. The volume serial number of the copy is not recorded in the DB2 catalog if the data set is cataloged in the MVS catalog. However, when the copy is retrieved, for example, to run a DB2 recovery, DB2 accesses the data set using the list of volumes as they are cataloged and the file sequence number of the data set (which is also stored in both catalogs). When stacking a large number of table space copies on tape, finding a specific data set might take a long time if there is a large number of files on the tape and a large number of volumes on which the data set is cataloged.
| ||||||||
DSNUTILB processing of objects not supported by BMC AMI Reorg | BMC AMI Reorg calls IBM DSNUTILB to process objects that BMC AMI Reorg cannot process. The DSNUTILB utility processing routine then generates the SYSIN statements that it needs to reorganize the objects. BMC AMI Reorg creates DB2 TEMPLATE statements for any copy data sets that need to be created. In those cases, the XCPYDYNM function variable is set to UTLB, and DSNUTILB calls XCPYDYNM to obtain the data set name and data set attributes needed for the TEMPLATE statements. The DSNUTILB utility processing routine then attaches DSNUTILB to process the objects. |