Previous Topic: 4.2.2 Generated Outputs

Next Topic: 4.2.4 Generator Definition Statements

4.2.3 MCG Operation


The MCG is invoked through one of two standard
complex-wide procedures listed below:

    MICSGU - CA MICS Generation and Libraries Updated
    MICSGT - CA MICS Generation and Test (reports and
             test only)

Standard jobs have been generated by JCLGEN0 for the standard
CA MICS components using the MICSGU PROC. These jobs are
named cccCGEN, where ccc is the component identifier (for
example, SMFCGEN).

We suggest using the PROCs in the following manner:

    o  Use MICSGU for all functions for standard CA MICS
       components.

    o  Use MICSGT to test the operational fitness of
       generated user components.

Remember that whenever a MICSGU is executed, it is necessary
also to execute the JCL and cycle generations for the
applicable database units (reference Section 4.2.1).
COMPONENT GENERATOR EXECUTION

The component generator may be executed to generate and test
a component on a temporary basis or to generate the final
version of the component and load the production libraries.

A standard procedure, MICSGT, has been provided to enable the
user to generate and test a user component.  The only
symbolic that is required to execute the procedure is &COMPT,
which is used to define the component that is being
generated.  See Chapter 7 for more information.
COMPONENT GENERATOR EXECUTION FLOW

The component generator reads generator definition statements
and, based on the options and definitions input, dynamically
invokes the required generator subroutines.

Phase 1:

The component generator supervisor, GENCOM, is the first
module executed and serves the purpose of the SAS INCLUDE
member for the generation job.  Prior to actually beginning
execution, GENCOM %INCLUDEs two members, #BASMSTR and
GENSASMC.

#BASMSTR is the standard CA MICS step initialization process.
It dynamically builds a number of required Macros.

GENSASMC contains all of the standard MACROs used in the
generation process and is not an executable module.

Phase 2:

The component generator supervisor, GENCOM, then invokes the
generator initialization routine, GENINIT.

    GENINIT performs a pre-pass of the generator definition
      statements to identify the type of generation to be
      performed and the component to be generated.  This
      information, with the date and time of generation, is
      stored by the CA MICS Global Data Facility for
      reference by other generator subroutines.

Phase 3:

The component generator supervisor, GENCOM, then invokes the
common element definition generator, GENSASCE.

    GENSASCE processes the member $DEGENIN from GENLIB to
      create input to be used by the GENINPUT routine in
      processing common data elements.  $DEGENIN contains
      generator definition statements which identify common
      data elements, their processing attributes (retained,
      accumulated, maximum, etc.), LENGTH and FORMAT
      definitions, SAS LABEL, Data Dictionary ALIAS, and
      alternate field name definitions.

Phase 4:

The component generator supervisor, GENCOM, then invokes the
generator definition statement input parser, GENINPUT.

    GENINPUT performs the following operations:

      1)  Creates a work file (GENFIL) which contains a
          record for each FILE defined.

      2)  Creates a work file (GENINF) which contains a
          record for each INFORMATION AREA defined.

      3)  Creates a work file (GENDED) which contains a
          record for each DATA ELEMENT/TIMESPAN defined.

      4)  Creates a work file (GENDEP) which contains a
          record for each DATA ELEMENT/TIMESPAN DEPENDed on
          by a derived data element in that timespan.

      5)  Creates a work file (GENCED) which contains a
          record for each computed EXPRESSION required to
          build the code for computed data elements.

      6)  Inputs and edits each of the generator definition
          statements.

      7)  Builds SELECT indicators which are input by GENCOM
          to determine which modules are to be executed.

      8)  Processes @@ACCT statements and dynamically invokes
          the account code generator.  This enables GENINPUT
          to then substitute the actual account codes into
          the appropriate locations.

      9)  Processes @@FIRST and @@LAST statements and outputs
          the information to the computed expression (GENCED)
          file.

     10)  Verifies all sequence patterns to ensure that:  (1)
          each file has at least one sequence field, (2) the
          sequence fields are ascending in rank and
          contiguous, and (3) sequences are not defined more
          than once within a file.

     11)  Verifies logical data conditions to ensure that (1)
          an element is not defined more than one time within
          a file, and (2) computed elements must have
          computed expressions.

Phase 5:

The component generator supervisor, GENCOM, then invokes the
required generator subroutines, based on the options that
have been defined, to generate the component.  If the
component being generated is the Base (BAS) Component, then
the select indicators are set to indicate that a number of
modules are not to be generated.

    1) Invokes component-unique generators to create
       specialized SAS code for the respective component.

    2) Invokes the required modules to perform GENFILES
       generation (File Tailoring).

Phase 6:

The component generator supervisor, GENCOM, then invokes the
update mechanism, %GENUPDT, that stores generated members
into CA MICS libraries.