DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 26
COBOL Command
•
Only one COBOL source file can be open at a time. If you use the COBOL
command when you already have a COBOL source file open, DDL closes the
current source file before opening the new source file.
•
The specified COBOL source file can be an EDIT file, an unstructured file, or a
sequential device such as a terminal, a spooler, or a process. If the file exists but is
not one of these types, DDL issues an error message and does not open the file.
•
If the COBOL source file already exists and the exclamation point is omitted, DDL
appends the generated source code to the end of the file’s original contents. DDL
does not replace any existing structures.
•
Each DDL object translated into COBOL source code is written to the source file in
a separate section with the same name as the DDL object it contains. You can
suppress the default section headings with the SETSECTION command.
•
The DDL compiler performs all of the syntax checks listed under the COBCHECK
command before writing source output. If it finds a syntax error, DDL issues an
error message and does not write the source output for the DDL object statement
with the error; it does write source output for the DDL object if only a warning
is issued.
COBOL Command Examples
In this example, the DDL compiler opens a COBOL source file, COBSRC, on the
subvolume $DATA.SALES and adds the definition for NAME to that file.
This definition is written to COBSRC as follows:
?SECTION NAME,TANDEM
01 NAME.
02 LAST-NAME PIC X(12).
02 FIRST-NAME PIC X(8).
02 MIDINIT PIC X(2).
The UPSHIFT clause is not recognized by COBOL and is not included in the COBOL
source code.
?COBOL $data.sales.cobsrc
DEF name.
02 last-name PIC X(12)
UPSHIFT.
02 first-name PIC X(8)
UPSHIFT.
02 midinit PIC X(2)
UPSHIFT.
END
Open COBOL file
VST905.vsd
Содержание 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 ...