Chapter 10

 

Section 17 -  Construct Standards and ProceduresConstruct Standards and Procedures

 

Natural Construct is a Software AG (SAG) product that generates Natural programs.  It generates programs based on input it receives through Natural Construct maintenance panels.
 

The following procedures and standards are meant to provide guidelines for the consistent usage of Natural Construct.  Details on how to generate programs can be found in applicable Natural Construct manuals.
 

A basic knowledge of Natural, Predict, Natural Construct and shop naming standards is assumed throughout this section. 

 

10.17.1  Natural Standards 

A common set of Natural standards will be agreed upon at a minimum at each shop level.  The base level Natural standards will be those provided by the Natural Construct product.  Suggestions for model changes are encouraged and will be analyzed by Construct modeling staff when requested. 

 

10.17.2  Common Input Specifications 

Natural Construct has several input specifications common to all of the models.   A template program will be created and saved using the MENU model.  This allows capturing common input specifications only once.   To generate a new program execute a Read from the Generation Main menu by entering the name of the template program and the name of the model to be used for generation.    This template will be called NNNNTMPT where NNNN is the system prefix.  The input specifications to be saved are:
 

  1. System Name - the four-character system prefix. 

  2. Global Area - the GDA to used for the system. 

  3. First Header - a name that will be common to all screens. 

  4. Direct Command Processing - whether direct command processing will be used in the system.

  5. Message Text vs Message Numbers - whether to use textual message or message numbers.
     

These input specifications should remain constant throughout all generated programs in the system.
 

To create an initial system template enter all the input specifications described above.  Then save the template by selecting the Save code (Generation Main Menu) and marking the Options field.  When the Save Options pop-up window appears, mark the Save Specifications Only flag. 

 

10.17.3  User Exits 

Construct provides the capability to write code to enhance the capability of a generated program.  This code is contained in User Exits.  No generated code is to be modified.  Code modifications or additions are to be accomplished within the defined User Exits.  If an appropriate User Exit does not exist, a new user exit can be added to the supported models. 

 

10.17.4  Map Usage 

All programs generated with Natural Construct will use maps.  How maps are used varies with each model.  Database variables will be used on maps.   Default map layouts for appropriate models are available and should be used. The default maintenance map provides a common exit point for a map. Contact the DBA for more information about map layouts. For details about map usage refer to the Natural Construct Generations Users manual. 

 

10.17.5.1   Program Help 

Program level help will be entered into the Natural Construct Help file.   The command NCSTH initiates the Natural Construct help subsystem.   The Natural Construct help subsystem is used to maintain the help text.   The help TYPE will be 'P'.  The MAJOR component will contain the four-character system identifier.   The MINOR component will be the program name.     The help routine 'CD-HELPR' will be attached to the map profile with the parameter #HPARM.   Details about how to use the help subsystem are available in the Natural Construct Help Text User's manual. 

 

10.17.5.2   Database Variable Help 

The extended description, which is attached to the element definition in Predict, will be the text used for help on database variables.  To retrieve the extended description as help attach ''CD-HELPR',=' to field HE parameter on the map. 

 

10.17.5.3   User Variable Help 

User variable help will be stored on the Natural Construct help file.  The help text can be maintained by using the NCSTH command to invoke the Natural Construct help subsystem.  The help TYPE will be 'F' for field.  The MAJOR component will be the four-character system identifier.   The MINOR component will be the name of the field.  This help will be invoked by attaching a help routine ''DP01HELP',=' to the field.  If a browse help routine is created for the variable,  it is not necessary to call 'DP01HELP' for textual help about the field, add the help text for the field in Predict or the Construct help file. 

 

10.17.5.4   Value Help for Fields 

Help routines can be created to read a database file and display/return the values from the file.   These routines will be generated using the DB33-BROWSE-HELPR model.  If textual help is necessary it will be retrieved by pressing PF1. 

 

10.17.6  Predict Interfaces 

A SYSTEM entry for each library will be entered into Predict before generating programs.
 

A KEYWORD, which consists of the first four characters of the application-id, will be added before generating programs.
 

Refer to paragraph 10.14 in the BIT Standards manual for further information. 

 

10.17.6.1   Natural Construct Relationships 

Natural Construct contains a set of models called OBJECT models.  To use these models Predict Relationships must be defined.   For more information refer to chapters 3 and 12 in the Natural Construct Generations Users manual. 

 

10.17.6.2   Automatic Program Documentation 

Programs will use the Construct documentation option which automatically documents the program in Predict.  If a program is manually entered into Predict the Natural Construct routine will replace this entry only if 'Natural Construct' has been entered as an Author.  If the Natural Construct documentation option is used you will attach a keyword consisting of the first four characters of the application-id, a keyword which is the name of selected model appropriate comments and an extended description. 

 

10.17.6.3   Model Documentation 

Details about individual requirements for each model are documented in the Construct Generation Users Manual.  There will also be a general description of the available models defined as Model entities in Predict.   The models documented in Predict will be prefixed with DB33 (Ex.  DB33-Maint, DB33-Browse etc.).  When generating programs, only use the models with DB33 prefix or system specific models. 

 

10.17.7  Statement Models 

Natural Construct V3.1 provides capability within in the program editor.  The '.G' line command gives the capability to generate a Natural statement by specifying inputs to build the statement.  Statement models could build a whole block of data.  These can be used in the Construct user exit editor or the Natural Editor.  For more information refer to Chapter 16 in the Natural Construct Generations Users manual. 

 

10.17.8  Model Enhancements/Creation 

If the current models do not meet your needs or you cannot accomplish your goal by using user exits (or adding user exits) and have a function that will be used throughout the system contact the Construct modeling team.  They will analyze the problem to determine if a solution can be obtained within the existing models.  If a solution is not found then build a prototype of the function.  Build this prototype by either generating the function with existing models and modifying the code or write it from scratch. The prototype can then be reviewed by the Construct Modeling staff to determine if the model is specific to that system or is suitable for use by all.

 

 

Home Up 10.1 Naming Standards 10.2 Program Structure 10.3 Processing Rules 10.4 Data Base Fields 10.5 Define Data 10.6 Initialization 10.7 Batch 10.8 System Construction 10.9 Tables 10.10 Maps 10.11 Help 10.12 Error Processing 10.13 Natural Security 10.14 Predict Support 10.15 Audit 10.16 HOC Programming 10.17 Construct Standard