TNS/R Native Application Migration Guide

TNS/R Native Application Migration Guide523745-001
7-1
7
Data Definition Language (DDL)
Migration Tasks
The Data Definition Language (DDL) defines data objects and translates object
definitions into source code for programming languages and other products. Data
objects can include parameters, structures, messages, database entries, and disk
records. Data objects in host-language source code generated by DDL have the same
physical layout, regardless of host language.
The native compilers align data for optimal performance on TNS/R systems by default.
This default alignment is different and incompatible with the default data alignment
generated by the TNS compilers, except for the COBOL85 and NMCOBOL compilers.
The COBOL85 and NMCOBOL compilers generate code with the same data
alignment. You need not change any data alignment directives before migrating a TNS
COBOL85 program to native COBOL85. You need not regenerate DDL source files
that TNS COBOL85 and native COBOL85 programs share.
Because of the data alignment incompatibility for languages other than COBOL85, the
D40 DDL compiler has been enhanced to generate host-language 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.
Except for COBOL85, host-language source files used by native programs and shared
with TNS programs must be generated using the D40 DDL compiler. Host-language
source files supplied by HP have already been generated by the D40 DDL compiler.
Host-language source files used exclusively by native programs or TNS programs do
not require any changes. Only shared host-language source files must be generated
using the D40 DDL compiler.
If you deliver host-language source files to your customers or use a significant number
of host-language source files, make sure you plan and test your files carefully to
ensure that you generate new source files for all files shared by TNS and native
programs.
The remainder of this section does not apply to COBOL85 programs.