TNS/R Native Application Migration Guide

TNS/R Native Application Migration Guide523745-001
11-1
11 Shared Data Migration Tasks
This section describes the migration tasks related to:
Sharing Data Between TNS and Native Programs
Sharing Data Between pTAL Programs and Native C or C++ Programs on
page 11-2
Shared data objects can include parameters, structures, messages, database entries,
and disk records.
Sharing Data Between TNS and Native
Programs
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.
Because of this data alignment incompatibility, data objects shared between native
programs and TNS programs require FIELDALIGN SHARED2 pragmas for C and C++
and FIELDALIGN SHARED2 directives for TAL and pTAL. This pragma and directive
cause both the TNS and native compilers to generate code with the same alignment.
FIELDALIGN SHARED2 produces code that is not optimally aligned for TNS/R
systems. Therefore, specify FIELDALIGN SHARED2 only for shared data objects.
Otherwise, use the default native compiler alignment.
For more information on controlling data alignment, see:
C/C++ Programmer’s Guide
pTAL Reference Manual
D-series versions of the TAL compiler support FIELDALIGN directives. D-series
versions of the TNS C compiler that support FIELDALIGN pragmas are listed in the
following table:
Note. If DDL (Data Definition Language) is used to define shared data objects and generate
source code, see Section 7, Data Definition Language (DDL) Migration Tasks.
For this TNS C compiler product version... Use an RVU version of at least...
T9255D20 T9255ABN
T9255D30 T9255ABM
T8377D30 T8377AAA
T9255D40 In base product version. No IPM required.
T8377D40 In base product version. No IPM required.