Data Definition Language (DDL) Reference Manual — 426798-002
C- 1
C
DDL Data Translation
This appendix describes how data defined in DDL is translated into each of the seven
supported host languages.
The DDL compiler can translate any definition or record into data-declaration source
code for host languages (C, COBOL, FORTRAN, Pascal, TACL, TAL, and pTAL). The
only restriction on translation is that not all data types are supported in all languages,
as indicated by the following:
•
Whenever a declared data type is not supported in a particular language, DDL
attempts to translate the data type into a declaration with a compatible data type.
For example, DDL structures described with PICTURE X or PICTURE 9 clauses
are translated into CHARACTER data type in FORTRAN or STRING BYTE data
type in pTAL or TAL; a structure described as PICTURE S9(4) COMP is translated
into an INT data type in pTAL, TAL, or TACL, or a NATIVE-2 data type in
COBOL85; a DDL TYPE BINARY 64 data type is translated into a
long long
data type in C or an INT64 data type in Pascal.
•
When no compatible data type is available, DDL translates the data type into a
character-string declaration. For example, a structure described as TYPE FLOAT,
which is the REAL data type used by FORTRAN, pTAL or TAL, is translated into a
PICTURE X(4) data type in COBOL.
Table C-1
on page C-2 through
Table C-6
on page C-12 provide a summary of how the
data defined in DDL is translated into each host language. The first part of each table
shows how various PICTURE clauses are translated; the second part shows how
various TYPE clauses are translated. The tables are organized in alphabetic order by
host language.