Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Copy for Db2 13.1.

Using symbolic variables


You can also use symbolic variables when you specify a data set name in a COPY, COPY IMAGECOPY, or RECALL statement, or in an output descriptor.

BMC AMI Copy allows you to represent the variable elements shown in the following table, using symbolic variables.

You can specify any or all nodes of a data set name using symbolic variables as in the following example:

COPYDSN(&UID.&TS.&TYPE)

This example generates data set names containing the ID of the user making the copies, the space being copied, and the type of copy. In this case, &TYPE generates LP in the first name and LB in the second name. Another example follows:

DSNAME(NEWYEAR.&DB.&TS)

This example combines a real node name with symbolic variables to generate a data set name.

Symbols for numeric variables (&DATE, &TIME, &JDATE, &YEAR, &MONTH, &DAY, &JDAY, &HOUR, &MINUTE, &SECOND, &SEQ, &DSNUM, &LDSNUM, &PART, and &LPART) must be prefixed by a Latin alphabetic character. In the following example, the first statement causes errors, while the second is correct.

COPYDSN(&DB.&TS.&DATE)

RECOVERYDSN(&DB.&TS.RP&DATE)

Although you can prefix a symbolic variable with an alphabetic character, you cannot append characters. If you append any characters or numbers after the symbolic variable, those characters or numbers are ignored and are not used. For example, XX&TS is valid, but &TSXX is invalid. &TS.XX is also valid.

You can also use substrings of symbolic variables in data set names in the format symbolicVariable(n,m), where the substring starts with character n for a length of m characters. In the following example, 2 is the substring starting position and 4 is the substring length.

&DBNAME(2,4)

You can use symbolic variables in the following table with GDGs simply by appending the generation number in parentheses in the usual way. For example, &TS(+1).

Symbolic variables for specifying data set names

Symbolic variable

Definition

Length of result 1 2

&ATTACH 3

Db2 group attachment name or subsystem ID

4 bytes

&DATE 4 5

Current date (in the form YYMMDD)

6 bytes

&DAY 4 5

Current day (in the form DD)

2 bytes

&DB

Database containing the space being copied

8 bytes maximum

&DSNUM or &PART 5

Data set or partition being copied

2 bytes (0-99)

3 bytes (100-999)

4 bytes (1000-4096)

&HOUR 4 5

Current hour (in the form HH)

2 bytes

&ICTYPE

Type of image copy

  • F for FULL YES
  • I for FULL NO
  • A for FULL AUTO or CHANGELIMIT 6

1 byte

&INST

Instance number, with valid values of 01 or 02

2 bytes

&JDATE 4 5

Current Julian date (in the form YYDDD)

5 bytes

&JDAY 4 5

Current Julian day (in the form DDD)

3 bytes

&JOBNAME

JOB name used in the JCL

8 bytes maximum

&LDSNUM, &LPART 5

Data set or partition being copied (long format)

3 bytes (000-999)4 bytes (1000-4096)

&MIN 4 5

Current minute (in the form MM)

2 bytes

&MINUTE 4 5

Current minute (in the form MM)

2 bytes

&MONTH 4 5

Current month (in the form MM)

2 bytes

&OBNOD

Object node (databaseName. spaceName, where spaceName is either a table space name or an index space name)

17 bytes

&PART or &DSNUM 5

Data set or partition being copied

2 bytes (0-99)

3 bytes (100-999)

4 bytes (1000-4096)

&PART4

Partition for data set allocation

You can use this variable for any data set.

BMC AMI Copy generates 4-character partition numbers as follows:

Partition 1 = 0001

Partition 10 = 0010

Partition 100 = 0100

Nonpartitioned = 0000

Example
ABC.DSN1.DA.&DB.&TSIX..P&PART4

In this example, BMC AMI Copy generates the following 4-character partition number for partition 496:

ABC.DSN1.DA.DBNAME.TSNAME.P0496

4 bytes for table spaces with 4096 partitions or fewer

&PART5

Partition for data set allocation

You can use this variable for any data set.

BMC AMI Copy generates 5-character partition numbers as follows:

Partition 1 = 00001

Partition 10 = 00010

Partition 100 = 00100

Partition 1000 = 01000

Nonpartitioned = 00000

Example
ABC.DSN1.DA.&DB.&TSIX..P&PART5

BMC AMI Copy generates the following 5-character partition number for partition 4096:

ABC.DSN1.DA.DBNAME.TSNAME.P04096

5 bytes for table spaces with 4096 partitions or fewer

&SEC 4 5

Current second (in the form SS)

2 bytes

&SECOND 4 5

Current second (in the form SS)

2 bytes

&SEQ 7

Sequence number that increments with each reference. It can be used to provide unique output data set names. The sequence number restarts at 1 for each job step.

2 bytes

&SSID

Db2 subsystem ID

4 bytes

&STEPNAME 8

STEP name used in the JCL

8 bytes maximum

&TASK 7

1- to 2-digit number corresponding to the subtask in which a copy is made. If the copy is made in the main task, the value is 0.

2 bytes

&TIME 4 5

Current time (in the form HHMMSS)

6 bytes

&TS 9

Table space or index space being copied

8 bytes maximum

&TYPE

Type of output being produced:

  • LP for local site primary
  • LB for local site backup
  • RP for recovery site primary
  • RB for recovery site backup

2 bytes

&UID or &USERID

Job or TSO user ID

7 bytes maximum

&UNIQ or &UQ

1- to 8-character value, based on the system clock, that is used to generate unique copy data set names

The first character is always an uppercase letter. Each remaining character is either an uppercase letter or a numeral from 0 through 9.

8 bytes maximum

&UTIL 10

Utility ID

8 bytes maximum

&VCAT

VCATNAME specified in the Db2 catalog for the space that you are copying; or, if the space is partitioned and the copy is DSNUM ALL, the VCAT name from the first partition that you are copying

8 bytes

&YEAR 4 5

Current year (in the form YY)

2 bytes

1BMC AMI Copy removes any trailing blanks in the result.

2The maximum total length allowed for a data set name is 44 bytes, except for Instant Snapshot copies, where the maximum is 39.

3This is the group attachment name if BMC AMI Copy uses one as a parameter; otherwise, BMC AMI Copy uses the subsystem ID.

4BMC AMI Copy assigns the values for these variables when the output copy data set is allocated.

5You must prefix symbols with a numeric result by one or more alpha characters.

6You can override this by using the installation options ICAUTOI and ICAUTOF.

7For information on using this symbolic variable with cabinet copies, see Considerations-for-cabinet-copies.

8BMC AMI Copy ignores PROC names.

9&TS for an index copy is the index space name. Using &TS is supported so that a single data set name can be specified for a group containing both table spaces and indexes.

10BMC AMI Copy truncates longer utility IDs to 8 characters.

 

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