DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 25
COBOL Command
COBOL Command
The COBOL command instructs the DDL compiler to:
•
Create and open a COBOL source file or open an existing COBOL source file.
•
Translate any subsequent statements that define DDL objects in the source
schema into COBOL source statements.
•
Translate any DDL objects specified in subsequent OUTPUT statements into
COBOL source statements.
•
Write the COBOL source statements to the COBOL source file.
COBOL
opens the specified COBOL source file, translates all subsequent DDL objects
defined by statements or output from the dictionary into COBOL source
statements, and writes them to the open COBOL file. If a COBOL source file is
already open, the command closes the current file and opens a new source file.
cobol-source-file
identifies the COBOL source file. For the syntax of file names, see
DDL File
Names
on page 2-2. If
cobol-source-file
is omitted, DDL displays the
COBOL source code at the home terminal.
!
purges the contents of an existing COBOL source file before opening the file. If the
specified file does not exist, DDL ignores the exclamation point.
NOCOBOL
closes the currently open COBOL source file and stops translating subsequent
statements that describe DDL objects. NOCOBOL is the default.
COBOL Command Guidelines
The following points are guidelines for using the COBOL command:
•
By default, DDL generates COBOL85 source code.
•
All DDL objects are translated into COBOL85 source code.
•
For the data types that DDL generates for COBOL, see
Table C-2
on page C-4.
•
The compiler can translate DDL objects specified in an OUTPUT statement only if
the dictionary containing these structures is open.
{ COBOL [ cobol-source-file [ ! ] ] | NOCOBOL }