Customizing data set names

You can set up Db2 Admin Tool to use your local naming conventions for data sets.

Procedure

To customize data set names, modify the ADB2UCUS skeleton that resides in the ISPSLIB library as follows:
  • Edit any data set names that are preceded by SET statements as needed. (SET statements are indicated by )SET.)
  • Use variables for the data set names as needed. A complete list of variables is included in the SLIB member ADB2UCUT. Some variables you can use are:
    &AJDATE
    Julian date (YYDDD)
    &AJDAY
    Julian day (DDD)
    &AYEAR4
    4-digit year (YYYY)
    &AGDATE
    Gregorian date (YYMMDD)
    &ANMON
    Numeric month (MM)
    &ADAY
    Day (DD)
    &AYEAR
    2-digit year (YY)
    &ACMON
    3-character month (XXX)
    &ATIME
    Time (HHMMSS)
    &ATIME7
    Time with tenths of seconds (HHMMSST)
    &ATIME4
    Time without seconds (HHMM)
    &AHOUR
    Hour (HH)
    &AMIN
    Minute (MM)
    &ASEC
    Seconds (SS)
  • Ensure that data set names do not extend beyond column 71 in the ADB2UCUS data set. Any characters beyond column 71 are truncated.
  • Ensure that generated data set names, including periods, will not be longer than 44 bytes.
When you subsequently run SMP/E to receive and apply SMP/E usermod ADBU002, the updated ISPF JCL skeletons are added to the SADBSLIB library.
Tip: For testing purposes, copy the ADB2UCUS skeleton to a private skeleton library and make your changes. This private skeleton library must be allocated first in the ISPSLIB concatenation (using the USERADD parameter of the ADBL CLIST). After testing is complete, use an SMP/E USERMOD to update the Db2 Admin Tool product libraries. A sample SMP/E USERMOD is provided in member ADBU002 in the SADBSAMP library. Instructions for completing this step are provided in sample job ADBU002.

Example

This example demonstrates several different types of changes to the variable ASYCPY1.

The variable ASYCPY1 is shipped as follows:
)SET ASYCPY1 = &PREFIX..&DB2SYS..IC.&DBNAME..&NAME(+1)
To change the high-level qualifier from the current TSO PREFIX to MYHLQ, specify:
)SET ASYCPY1 = MYHLQ.&DB2SYS..IC.&DBNAME..&NAME(+1) /* CHANGE HLQ TO FIXED STRING
To change the second-level qualifier from the Db2 subsystem ID to TEST, specify:
)SET ASYCPY1 = &PREFIX..TEST.IC.&DBNAME..&NAME(+1)  /* CHANGE SUBSYSTEM TO 'TEST'
To insert a high-level qualifier of MYHLQ in front of the current TSO PREFIX and to remove the Db2 database name, specify:
)SET ASYCPY1 = MYHLQ.&PREFIX..&DB2SYS..IC.&NAME(+1) /* CHANGE HLQ TO FIXED STRING, 
                                                    /* INCLUDE PREFIX, REMOVE DBNAME
To use sequential data sets rather than a GDG data set, specify a data set name that contains date and time values to generate unique data set names:
)SET ASYCPY1 = &PREFIX..IC.&DBNAME..&NAME..D&AJDATE..T&ATIME