Data Definition Language (DDL) Reference Manual (G06.24+)
DDL Compiler Commands
Data Definition Language (DDL) Reference Manual—426798-002
9-9
C Command
•
With the exception of the TOKEN-MAP statement, DDL does not generate C data
definitions that allocate space. Instead, DDL generates C typedefs for scalar
types and structure templates for multiple-element DDL records.
•
DDL replaces any hyphen in a DDL name with an underscore (_) before writing the
name to the C source file.
•
DDL appends the characters _def to the tag for all C typedefs and structures
generated by DDL. Therefore, the maximum length for the name of a DDL
definition or record that is going to be translated into C is 27 ASCII characters, not
the standard DDL length of 30 characters.
•
All C identifiers generated by the DDL compiler are in lowercase letters, except
#define names, which are in uppercase letters by default. You can use the
NOCDEFINEUPPER command to specify lowercase letters for #define names.
•
The C source code for a definition or record compiled with EXPANDC contains the
fillers added by DDL as specified by the alignment algorithm in effect when the
definition or record was compiled.
•
For the data types that DDL generates for C source code, see Table C-1 on
page C-2.
•
The DDL compiler performs all of the syntax checks listed under the CCHECK
command before writing the C source output. If DDL finds a syntax error, it does
not write the source output for the object with the error; it does write source output
for an object if only a warning is issued.
•
All C arrays have a lower bound of 0.
•
When generating C source code, DDL ignores the following clauses:
In some cases, DDL ignores the NOVALUES clause. (For more information, see
VALUES Command on page 9-113.)
C Command Example
In the following example, the DDL compiler retrieves the record CUSTOMER and the
objects that the record refers to, directly and indirectly, from the open dictionary. Then
DDL translates the record and the referenced objects into C source code and appends
DISPLAY OCCURS DEPENDING ON
HEADING TACL
HELP UPSHIFT
INDEXED BY USAGE IS INDEX
MUST BE 88 condition-name
NULL