TNS/E Native Application Conversion Guide

Converting Data Definition Language (DDL)
TNS/E Native Application Conversion Guide529659-003
7-2
Generating New Host-Language Source Code Files
compilers or native compilers are used. To ensure the same data alignment, the D4x,
G-series, and H-series DDL compilers emit FIELDALIGN SHARED2 pragmas for C and
FIELDALIGN SHARED2 directives for TAL and pTAL.
Except for COBOL, host-language source files used by TNS/E native programs and
shared with TNS programs must be generated using the D4x, G-series, or H-series
DDL compiler. Host-language source files supplied by HP for H-series systems have
already been generated by the H-series DDL compiler.
Host-language source files used exclusively by TNS/E native programs or TNS
programs do not require changes. Only shared host-language source files must be
generated using the H-series DDL compiler.
If you deliver host-language source files to your customers or use a significant number
of host-language source files, 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 applies only to C, C++, TAL, and pTAL programs; it does
not apply to COBOL programs.
Generating New Host-Language Source Code
Files
If a TNS program uses host-language source files that HP supplies, you do not need to
generate new host-language source files. HP products that supply DDL files have been
generated by H-series DDL for you. Proceed to Compiling With New Host-Language
Source Code Files on page 7-3.
If a TNS program uses host-language source files that you created, you must generate
new files with the H-series DDL compiler. The DDL compiler requires a DDL source
schema file or a DDL dictionary to generate host-language source files. If you think
your DDL dictionary differs from your DDL source schema files, generate a new DDL
dictionary. Before generating a new DDL dictionary:
1. Make a complete backup of the existing DDL dictionary.
2. Generate new source schema files from the existing DDL dictionary.
3. Compare the existing source schema files with the new source schema files and
resolve any differences by making the appropriate changes in the source schema
files.
4. Generate the new DDL dictionary using the corrected source schema files.
To identify those DDL files that you have generated with the H-series DDL compiler,
you might want to add a comment to the DDL source schema files similar to that used
in HP source schema files:
DDL output recompiled with H-series DDL to allow native and non-
native applications to share structures.