Previous Topic: 6.2.1.2.2 Adding New Common Data Elements

Next Topic: 6.2.2 Tailoring Database Files

6.2.1.2.3 Assigning Alternate Data Element Names

The CA MICS Component Generator (MCG) contains a facility for
changing the name of a common data element for reference
purposes.
 
************************************************************
*                                                          *
*    WARNING:  Using the facility described in this        *
*    section can have major, unexpected impacts.           *
*    Very, very few installations truly need this          *
*    capability.  Please contact CA MICS support           *
*    before attempting to assign an alternate name         *
*    to any data element.                                  *
*                                                          *
*    ***WE DO NOT RECOMMEND USE OF THIS FACILITY***        *
*                                                          *
************************************************************
 
Normally, changing the name of a data element is a matter of
deleting the old data element and adding a new data element.
Such changes for common data elements have more impact than
for standard data elements.  Common data elements, such as
MONTH, are used in VERY MANY places.  Changing all the
CA MICS logic that references such data elements would be a
great effort, prone to errors.
 
The ALTNAME statement is an attempt to eliminate the need to
change logic if it is desirable to change the name (tag)
associated with a common data element.
 
According to the definition in the MCG section of this
document, a common data element type group is made up of a
TYPE statement, followed by one or more NAME statements.
Each NAME statement defines a data element.  The NAME
statement may be preceded optionally by an ALIAS statement,
and may be preceded optionally by an ALTNAME statement.
 
The example NPANCP file definition contains the component
generator definition statements in the NPAGENIN member of
sharedprefix.MICS.GENLIB:
 
...
NAME DAY       99  5 5 N N N .
NAME HOUR      99  6 6 6 N N .
NAME WEEK      99  0 0 4 N N .
NAME YEAR      99  3 3 3 3 3 .
NAME MONTH     99  4 4 N 4 N .
...
 
where the common data elements (cluster code 99) point to
common data element definitions for these data elements.
These definitions are contained in the generation library
member $DEGENIN:
 
...
TYPE XR  2  .  2  .  2  .
NAME DAY      Day of Month
TYPE XR  2  .  2  .  2  .
NAME HOUR     Hour Of Day
TYPE XR  2  .  2  .  2  .
NAME MONTH    Month of Year
TYPE XR  2  .  2  .  2  .
NAME WEEK     Week Of Year
TYPE XR  2  .  2  .  2  .
NAME YEAR     Year of Century
...
 
Let us assume that there was a need to rename the data
element MONTH to another name, well recognized in your
company's current report structure.  Let us call the new name
PERIOD.
 
Adding the following ALTNAME statement to the $DEGENIN
member will aid in the rename of the data element.
 
    ...
    TYPE XR  2  .  2  .  2  .
    NAME DAY      Day of Month
    TYPE XR  2  .  2  .  2  .
    NAME HOUR     Hour Of Day
    TYPE XR  2  .  2  .  2  .
--->ALTNAME PERIOD
    NAME MONTH    Month of Year
    TYPE XR  2  .  2  .  2  .
    NAME WEEK     Week Of Year
    TYPE XR  2  .  2  .  2  .
    NAME YEAR     Year of Century
    ...
 
WHAT ASSIGNING AN ALTERNATE NAME DOES:
 
Assigning an alternate name to a common data element adds
a new data element to all files that reference the old data
element name in their file definition MCG statements in
sharedprefix.MICS.GENLIB member cccGENIN.  The old data
element name is dropped from the file.
 
In our example, the NPAGENIN member defines files that
contain the data element MONTH.  Specifying the ALTNAME of
PERIOD for MONTH in $DEGENIN means that MONTH will not be on
the files, but PERIOD will be there instead.
 
This means that any report process may reference the item
by the new name.
 
WHAT ASSIGNING AN ALTERNATE NAME DOES NOT DO:
 
This modification does not assign an initial value to the
new data element.  In the example, the value for the data
element PERIOD will have to be set by some other CA MICS
modification.  Several methods for such a modification exist.
 
If the data element exists in a large number of CA MICS
files, modification of common system routines is indicated.
 
If the data element exists in a small number of CA MICS
files, especially if the files are localized to one
component, use the standard CA MICS file exits described in
chapter 4 of this guide.
 
For this NPA example, the file exit for the NPANCP file
is  _USRSNCP, in sharedprefix.MICS.SOURCE(#NPAEXIT).  The
calculation must be added to the stub exit macro that
currently exists.  The current macro is:
 
    MACRO _USRSNCP   %
 
which should be modified to:
 
    MACRO _USRSNCP
      PERIOD = MONTH;
    %
 
Such a calculation is possible because renaming the data
element does not drop the original data element from standard
CA MICS calculations. In fact, all existing CA MICS logic
will reference the data element name by the old name.  This
allows a flexibility in the file structure without massive
CA MICS logic changes.
 
This code will be executed immediately before the format
routine writes a DETAIL observation of the NPANCP file, and
the data element value will be set when the OUTPUT occurs.
 
Such logic would have to be executed to set a value for
PERIOD before the format routine OUTPUT for each file of each
component in which the data element is to be carried.
 
 
****************************
* Making the Modifications *
****************************
 
 To assign an alternate name to a common data element, perform
the following:
 
    - Code the MCG ALTNAME statements for the data element
      to be added to $DEGENIN.
 
      Note:  the cccGENIN members do not need to be changed.
 
    - Add initial calculations for the data element's DETAIL
      timespan value to the standard file exit in the
      component's standard exit member on the CA MICS source
      library, if the change is local to a component.
 
      -or-
 
      Add initial calculations for the new data element to
      a common data element determination routine, in the
      recommended method for such modifications.
 
    - Run the component generation for the components in
      question.
 
    - The next daily update for any database unit in which
      the component has been installed will reflect the
      change, and add the data element to the files in the
      desired timespan(s).
 
To assign an alternate name to a data element, if the data
element IS a sequence data element in the file, see the
sections in this chapter on modifying the sequence of a file.
Modify the sequence, and follow the instructions above to
assign the alternate name.