HP 3000 Manuals

Generating FORM Definitions [ HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual ] MPE/iX 5.0 Documentation


HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual

Generating FORM Definitions 

If you specify FORM as the entity type in the GENERATE command, SDCDE
generates a COBOL record definition for the form with the given entity
name.  SDCDE first prompts you for a module name:

     Module name for FORM form-name >

If the given module name already exists in the current copy library, the
copy library's OPEN-MODE parameter determines whether to append all
generated code to the existing module or to replace the existing module.
If you enter a [[RETURN]], SDCDE does not generate any code for the
record and the GENERATE command will be complete.

If you specify the ELEM-QUALIFY parameter of the OPTIONS command, SDCDE
responds with one of the following prompts, depending on the value you
specify:

Value            Prompt 

PREFIX           Element prefix >

SUFFIX           Element suffix >

NONE             No prompt

SDCDE attaches the prefix or suffix characters to the elements contained
by the form.  If you enter a [[RETURN]], SDCDE does not attach prefix or
suffix.

If you set the CONSTANTS parameter of the OPTIONS command to ON, SDCDE
issues a prompt for generating a field number table for the current form.
This prompt has the following form:

     Define field number tables (N/Y) >

If you enter a [[RETURN]] or an N, SDCDE does not define a table.  If you
enter a Y, SDCDE defines a field number table for the form.  In all
cases, SDCDE issues a prompt to determine if the numeric fields of the
form should be defined with a PIC 9 or a PIC X. The prompt has the
following form:

     Define numeric fields as PIC 9 or PIC X (9/X) >

If you enter a [[RETURN]] or a 9, SDCDE uses a PIC 9 description.  If you
enter an X, SDCDE uses a PIC X description.

When you complete the answers to these prompts, SDCDE generates the code
in the specified module for the form definition.  If you set the
CONSTANTS parameter to ON, descriptions for a form name and field number
table are generated.  The form name constant value is taken from the
vplus-alias attribute if one exists.  If a vplus-alias attribute does not
exist, the primary name is used.  The field numbers for the field number
table are obtained from the field-number attribute of the FORM contains
ELEMENT relationship.

Example 

In the following example, the form name is CUST-ORDER, ELEM-QUALIFY =
PREFIX, and CONSTANTS = ON.

     Module name for FORM CUST-ORDER > ORDFORM 
     Element prefix > [[RETURN]]

     Define field number tables (N/Y) > Y 
     Define numeric fields as PIC 9 or PIC X (9/X) > 9 

     000100
     000200  01  CUST-ORDER-DATA.
     000300      05  CUST-ACCT              PIC X(8).
     000400      05  PROD-NO                PIC X(15).
     000500      05  QUANTITY               PIC 9(8).
     000600      05  UNIT-PRICE             PIC X(12).
     000700      05  TOTAL                  PIC X(12).
     000800      05  ORDER-DATE             PIC X(8).
     000900      05  ORDER-STATUS           PIC X.
     001000
     001100  01  FORM-CUST-ORDER            PIC X(11)  VALUE "CUST-ORDER ".
     001200
     001300  01  CUST-ORDER-FIELDS.
     001400      05  FIELDNO-CUST-ACCT      PIC S9(4)  COMP  VALUE 1.
     001500      05  FIELDNO-PROD-NO        PIC S9(4)  COMP  VALUE 2.
     001600      05  FIELDNO-QUANTITY       PIC S9(4)  COMP  VALUE 3.
     001700      05  FIELDNO-UNIT-PRICE     PIC S9(4)  COMP  VALUE 4.
     001800      05  FIELDNO-TOTAL          PIC S9(4)  COMP  VALUE 5.
     001900      05  FIELDNO-ORDER-DATE     PIC S9(4)  COMP  VALUE 6.
     002000      05  FIELDNO-ORDER-STATUS   PIC S9(4)  COMP  VALUE 7.
     002100


MPE/iX 5.0 Documentation