Data Definition Language (DDL) Reference Manual
DDL Compiler Commands
Data Definition Language (DDL) Reference Manual—529431-004
9-99
SOURCE
If you give a SETSECTION command with a name, and then open a host-language
source code file, no SECTION commands are written to the file. The SECTION
command for the given name is not written because the file was not open at the time.
Also, the SETSECTION command inhibits any SECTION commands for individual
objects.
SETSECTION does not specify sections in the DDL schema being compiled. You use
the SECTION command to specify section names in a schema in order to selectively
compile source sections with the SOURCE command.
Example 9-50 on page 9-99 generates two source-code sections: one for constants
and one for definitions.
SOURCE
The SOURCE command compiles all or part a specified DDL schema.
source-name
is the name of the file that contains the schema file to be compiled.
Example 9-50. SETSECTION Command
DDL Input
?SETSECTION constants
CONSTANT custnum-heading VALUE "Customer/Number".
CONSTANT mdy-date-display VALUE "mm/dd/yy".
CONSTANT phone-display VALUE "M(999) 999-9999".
...
?SETSECTION defs
DEF deliv-date PIC 9(6) DISPLAY mdy-date-display.
DEF custnum PIC 9(4) HEADING custnum-heading.
DEF custphone PIC 9(10) DISPLAY phone-display.
...
DDL Output (COBOL Code)
?Section CONSTANTS,Tandem
01 CUSTNUM-HEADING PIC X(15), VALUE IS "Customer/Number".
01 MDY-DATE-DISPLAY PIC X(11), VALUE IS "M99/99/99".
01 PHONE DISPLAY PIC X(17), VALUE IS "M(999) 999-9999".
...
?Section DEFS,Tandem
01 CUSTNUM PIC 9(4).
01 CUSTPHONE PIC 9(10).
01 DELIV-DATE PIC 9(6).
...
SOURCE source-name [ ( section-name [ , section-name ] ...) ]