This section describes the CST-Pregen model, which is used to create the pre-generation subprogram for a model. The pre-generation subprogram is invoked:
During the generation phase after all maintenance subprograms have been executed
Whenever the SAMPLE command is issued from the User Exit editor
This section covers the following topics:
After generating the maintenance subprograms, generate the pre-generation subprogram to assign #PDAC condition values based on user-supplied parameters or other calculated values. The pre-generation subprogram also assigns the values of #PDA variables in the model PDA that are required by any subsequent generation subprograms.
Generated using the CST-Pregen model, this subprogram is invoked after all maintenance subprograms are executed during the generation phase or when the SAMPLE command is issued from the User Exit editor. It is the first user subprogram invoked.
Note:
All #PDAC-prefixed condition values are reset before generation
begins.
The pre-generation subprogram should also calculate the values of any #PDA variables required by subsequent generation subprograms.
For simple models that do not have code frames, this subprogram can also perform the functions of a generation subprogram. (Condition code values and derived fields can also be assigned within the maintenance subprograms.)
Note:
For an example of a generated pre-generation subprogram, refer to
CUMNPR in the SYSCST library.
Use the CST-Pregen model to create the pre-generation subprogram. This model has one specification panel, Standard Parameters.
CUGPMA CST-Pregen Subprogram CUG-MA0 May 26 Standard Parameters 1 of 1 Module name ........ CXMNPR_ Parameter data area CXMNPDA_ * Title .............. Pre-generation subprogram Description ........ Pre-generate subprogram._______________________________ Set conditions and assign shared PDA variables.________ _______________________________________________________ _______________________________________________________ Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- help retrn quit userX main |
The input fields on the Standard Parameters panel are:
Field | Description |
---|---|
Module name | Name specified on the Generation main menu. The
name must be alphanumeric and no more than eight characters in length. Use the
following naming convention:
CXxxPR where xx uniquely identifies your model. |
Parameter data area | Name of the parameter data area (PDA) for your
model. Natural Construct determines the PDA name based on the Module name
specified on the Generation main menu. For example, if you enter
"CXMNPR", Natural Construct assumes the PDA name is
CXMNPDA. Use the following naming convention:
CXxxPDA where xx uniquely identifies your model. |
Title | Title for the generated subprogram. The title identifies the subprogram for the List Generated Modules function on the Generation main menu and is used internally for program documentation. |
Description | Brief description of the subprogram. The description is inserted in the banner at the beginning of the subprogram and is used internally for program documentation. |
CSGSAMPL CST-Pregen Subprogram CSGSM0 May 26 User Exits 1 of 1 User Exits Exists Sample Required Conditional -------------------------------- -------- ---------- -------- ------------ _ CHANGE-HISTORY Subprogram _ PARAMETER-DATA _ LOCAL-DATA Example _ ASSIGN-DERIVED-VALUES Subprogram _ SET-CONDITION-CODES Subprogram X X _ GENERATE-CODE _ BEFORE-CHECK-ERROR Example _ ADDITIONAL-INITIALIZATIONS Example _ END-OF-PROGRAM |
For information about these user exits, see Supplied User Exits. For information about using the User Exit editor, refer to User Exit Editor, Natural Construct Generation.