HP DDL D40 Reference Manual page 327

Data definition language
Table of Contents

Advertisement

DDL Compiler Commands
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
CONSTANT mdy-date-display
CONSTANT phone-display
?SETSECTION defs
DEF deliv-date
DEF custnum
DEF custphone
DDL generates the following COBOL source code from the preceding DDL source:
?Section CONSTANTS,Tandem
01 CUSTNUM-HEADING
01 MDY-DATE-DISPLAY PIC X(11), VALUE IS "M99/99/99".
01 PHONE DISPLAY
?Section DEFS,Tandem
01 CUSTNUM
01 CUSTPHONE
01 DELIV-DATE
Data Definition Language (DDL) Reference Manual—426798-002
VALUE "Customer/Number".
VALUE "mm/dd/yy".
VALUE "M(999) 999-9999".
PIC 9(6)
DISPLAY mdy-date-display.
PIC 9(4)
HEADING custnum-heading.
PIC 9(10) DISPLAY phone-display.
PIC X(15), VALUE IS "Customer/Number".
PIC X(17), VALUE IS "M(999) 999-9999".
PIC 9(4).
PIC 9(10).
PIC 9(6).
9- 97
SETSECTION Command

Advertisement

Table of Contents
loading

Table of Contents