DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 97
SETSECTION Command
•
If SETSECTION is not specified or if SETSECTION is specified without
section-
name
, DDL precedes each DDL object in the open source-code files with a
?SECTION heading that uses the DDL object name as the section name.
•
The SETSECTION command affects only host-language source files (except TACL
source files) and DDL source files opened by the DDL command.
•
If you give a SETSECTION command with a name, and then open a host-
language source 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 source schema being
compiled. You use the SECTION command to specify section names in a source
schema in order to selectively compile source sections with the SOURCE
command.
SETSECTION Command Examples
The following example shows the use of the SETSECTION command to generate two
source-code sections: one for constants and one for definitions.
?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 generates the following COBOL source code from the preceding DDL source:
?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).
•
•
•
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...