Version 5.3.1
 —  Natural Construct Administration and Modeling  —

CST-Postgen Model

This section describes the CST-Postgen model, which is used to create the pre-generation subprogram for a model. The post-generation subprogram supplies values for the substitution parameters in the code frames, which is the final stage of the generation process.

This section covers the following topics:


Introduction

After defining the pre-generation subprogram, use the CST-Postgen model to generate the post-generation subprogram. This subprogram supplies values for substitution parameters in the code frames (identified by &). It is invoked as the final stage of the generation process when the application developer enters "G" in the Function field on the Generation main menu.

The post-generation subprogram substitutes the code frame parameters with the corresponding substitution values by stacking the substitution parameters and their corresponding values. Use the STACK TOP DATA FORMATTED statement to stack these values. Natural Construct performs the corresponding substitutions in the edit buffer and produces the final version of the generated program.

During the generation process, code lines specified in the code frame are written to the edit buffer, as well as the output of the generation subprogram contained in the code frame. Any substitution parameters are included in the edit buffer exactly as they appear in the code frame.

Note:
For an example of a generated post-generation subprogram, refer to CUMNPS in the SYSCST library.

Top of page

Parameters for the CST-Postgen Model

Use the CST-Postgen model to create the post-generation subprogram. This model has one specification panel, Standard Parameters.

Standard Parameters Panel

  CUGOMA                     CST-Postgen Subprogram                      CUGOMA0
  May 26                       Standard Parameters                        1 of 1
                                                                                
                                                                                
   Module name ........ CXMNPS__                                                
   Model name ......... ________________________________ *                      
                                                                                
   Title .............. Post-gen subprogram                                     
   Description ........ Post-generation subprogram. Stack post generation______ 
                        changes._______________________________________________ 
                        _______________________________________________________ 
                        _______________________________________________________ 
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
 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:
CXxxPS

where xx uniquely identifies your model.

Model name Name of the model that uses the post-generation subprogram.

Note:
Ensure that the specified model and its corresponding code frames have been defined on the Maintain Models panel.

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.

Top of page

User Exits for the CST-Postgen Model

 CSGSAMPL                    CST-Postgen Subprogram                      CSGSM0 
 May 26                            User Exits                            1 of 1 
                                                                                
                User Exits             Exists    Sample   Required Conditional  
     -------------------------------- -------- ---------- -------- ------------ 
  _  CHANGE-HISTORY                            Subprogram                       
  _  PARAMETER-DATA                                                             
  _  LOCAL-DATA                                Subprogram                       
  _  START-OF-PROGRAM                           Example                         
  _  ADDITIONAL-SUBSTITUTION-VALUES            Subprogram                       
  _  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, see User Exit Editor, Natural Construct Generation.

Top of page