Adjust the high level qualifier of datasets to comply with an SMS Policy within RC/Migrator
search cancel

Adjust the high level qualifier of datasets to comply with an SMS Policy within RC/Migrator

book

Article ID: 135757

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS Database Management for DB2 for z/OS - Administration Suite RC/Migrator for DB2 for z/OS

Issue/Introduction

In many sites due to the SMS policy, users cannot create datasets starting with their own userid. Using Model Services the utility
models can be adjusted so that the high level qualifier complies with the SMS Policy and creates dataset names that have an approved
high level qualifier. Another symbol can be be created and used as the high level qualifier which will make it acceptable to the SMS policy.

Cause

SMS Policy restriction on creation of datasets with a high level qualifier of the users own userid. 

Resolution

RC/Migrator model services allows for new user defined variables to be created and initialized with a value.

In this case the model utilities are IBM Load(LOAD) and Fast Load(FLOAD). Changing the high level qualifier can be done
with other utilities also like QCOPY for QUICK COPY.

Starting at RC/Migrator Profile option 6 - Utility Model Services

The utilities that work together:

FUNLD    for FAST UNLOAD

IBMULD   for IBM UNLOAD TABLE

FLOAD    for FAST LOAD

LOAD     for LOAD TABLE

In the LOAD and FLOAD utility member the UNLDDSN automatic variable obtains the value of the unload dataset
name(DATADSN) from FUNLD/IBMULD so that the table is reloaded from the unloaded dataset name.
No need to change anything on LOAD and FLOAD utility.


Insert the new variable

In either/both of the two unload utilities use the "S" line command edit them.

Use the INSERT ("I" line command on the symbol list at the top) in the CMD column to add a new variable
(which could be any unique name) and give it a value(hard coded) in the REPLACEMENT VALUE column.

The "I" Line command does this:

Insert a blank utility or symbol line. This lets you add your own utility or symbol to your model or utility.

CMD SYMBOL    ERR  REPLACEMENT VALUE 

    NEWHLQ         HLQVALUE                 <<<<< HLQVALUE is the new hardcoded value of variable NEWHLQ


Next we need to alter the dataset name pattern. 

Note the following usage rules:

A symbolic parameter must start with a percent sign (%).

To separate a symbolic parameter from the next field in the name use two periods (..).

Change the model dataset name pattern.

Alter the standard DSN variable on the screen by changing the existing string from %USERID to your new %NEWHLQ:

CMD SYMBOL    ERR  REPLACEMENT VALUE
  DSN            %USERID..%DSNQUAL2..%DSNQUAL3..%DTQUAL..T%TIME

to

CMD SYMBOL    ERR  REPLACEMENT VALUE
  DSN            %NEWHLQ..%DSNQUAL2..%DSNQUAL3..%DTQUAL..T%TIME


Reference info:

DSNQUAL2

Used in data set name qualification and set to a value as follows:

For table and index-related utilities, this value is the database name (the same as %DBNAME).

For all other utilities, this value is the object creator (same as %CREATOR).

DSNQUAL3

Used in data set name qualification and set to a value as follows:

For table related utilities, this value is the 3-byte literal TID followed by the object identifier for the table in 5-byte character format.

For index related utilities, this value is the indexspace name (same as %TSNAME).

For all other utilities, this value is the object name (same as %OBJECT).

DTQUAL

The date and time string for the generated data set for analysis in XDMSS format. DTQUAL ensures that a unique data set name
is created when allocated. XD represents the date. MSS represents the time.

TIME

The analysis time in HHMMSSH format.

Documentation page for a full list of symbolic parameters :

Symbolic Parameters

Dataset name construction

In the model the variable DATADSN uses the DSN value to create the full name of the unload dataset.

DATADSN        %DSN..DATA

So , above DATADSN resolves to the value of the DSN variable(HLQVALUE.DATABASE.TSPACENM.W0959.T1909598) followed by the text ".DATA"

 This produces a dataset name like this in the generated code:

 .ALLOC FI(SYSREC01)                                                   +
     DA('HLQVALUE.DATABASE.TSPACENM.W0959.T1909598.DATA')            +
     TRACKS                                                          +
     SPACE(4,6)                                                      +
     UNIT(SYSDA)                                                     +
     NEW CATALOG

The hard-coded value for NEWHLQ would have to be manually maintained as RC/Migrator would have no way to know what HLQ is required.
A number of similar models could be created that individually use different values for the NEWHLQ and so generating analysis output using
a different hlq is simply a matter of selecting the model that has the hlq value that is required for the job at hand.

Additional Information