Data Definition Language (DDL) Reference Manual
Introduction to DDL
Data Definition Language (DDL) Reference Manual—529431-004
1-11
Generating Source Code
TNS and Native Compilers
The native compilers align data for optimal performance on TNS/R and TNS/E systems
by default. This default alignment is different and incompatible with the default
alignment generated by the TNS compilers.
Because of this data alignment incompatibility, the D40 DDL compiler was enhanced to
generate source code that produces the same data alignment, regardless of whether
the TNS compilers or native compilers are used. To ensure the same data alignment,
the D40 DDL compiler emits fieldalign shared2 pragmas for C and FIELDALIGN
SHARED2 directives for TAL and pTAL.
Host-language source code files used by native programs and shared with TNS
programs must be generated using a version D40 or later DDL compiler. Host-
language source code files supplied by HP have already been generated by the correct
version of the DDL compiler.
Figure 1-4. Generating Source Code
15> DDL / IN schema
/
1
Generate source code
(entire schema)
16> DDL DICT
!?COBOL cobfile
!OUTPUT RECORD rec1 rec2.
!OUTPUT DEF def1 def2.
!EXIT
2
Generate source code (selected
records and definitions)
DDL
DDL
Source
Schema
COBOL
Source
Code
Dictionary
Dictionary
COBOL
Source
Code
? DICT
? COBOL
cobfile
DEF . . .
.
.
.
RECORD . . .
VST004.vsd