Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide520573-006
8-2
TNS to TNS/R or TNS/E Native Migration
completely migrate the application from the Guardian environment to the OSS
environment. If the program makes use of features which are not available from the
OSS environment, this may not be possible, and you may decide that a more realistic
approach is to add open features to the existing Guardian application.
In deciding the degree of migration, you must consider the general issues discussed in
the following subsections:
TNS to TNS/R or TNS/E Native Migration on page 8-2
Migration Options on page 8-3
Converting TAL or pTAL Code to C or C++ on page 8-3
Using New and Extended Guardian Procedures in Guardian Programs on page 8-3
Using OSS Functions in a Guardian Program on page 8-4
Communicating With OSS Programs on page 8-4
Migrating a Guardian Program to the OSS Environment on page 8-4
TNS to TNS/R or TNS/E Native Migration
If you are porting an existing Guardian application that was written for a TNS
environment and now wish it to run in a TNS/R or TNS/E native environment, there are
a few considerations that you must account for when migrating a Guardian application
from a TNS to a native environment. It is recommended that when migrating your
Guardian application programs to execute in a native environment, first make the
necessary native migration steps outlined in Section 10, Native Migration Overview,
then add the OSS function routines you wish to use. The migration steps and
considerations listed in Section 10, Native Migration Overview, should be used as a
quick reference to the features for the native environment. For a detailed discussion of
migrating C or C++ programs written for a TNS environment to a TNS/R native
environment, refer to the TNS/R Native Application Migration Guide.
To migrate from a G-series TNS environment to a TNS/E native environment, it is
recommended that you first migrate to the TNS/R native environment, then migrate to
the TNS/E native environment. Most TNS/R native programs will require no source
code changes to run in a TNS/E native environment; but you must recompile the
program using a TNS/E native compiler to create a TNS/E native object file. For
information on migrating from a TNS/R native environment to a TNS/E native
environment, refer to the H-Series Application Migration Guide.
To migrate from an H-series TNS environment to a TNS/E native environment, first
make the source code changes described in the TNS/E Native Application Conversion
Guide. Then recompile the program using a TNS/E native compiler.
For G-series TNS environments, the Guardian C run-time library is different from the
OSS C run-time library. For native environments, the Guardian C run-time and the
OSS C run-time library share the same source code, and OSS and Guardian programs
share the same shared run-time library (on TNS/R systems) or dynamic-link library (on
TNS/E systems).