Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
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” (page 137)
• “Migration Options” (page 137)
• “Converting TAL or pTAL Code to C or C++” (page 138)
• “Using New and Extended Guardian Procedures in Guardian Programs” (page 138)
• “Using OSS Functions in a Guardian Program” (page 138)
• “Communicating With OSS Programs” (page 138)
• “Migrating a Guardian Program to the OSS Environment” (page 138)
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 Chapter 10 (page 170),
then add the OSS function routines you wish to use. The migration steps and considerations listed
in Chapter 10 (page 170) 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 (H-series or J-series),
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 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 or J-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 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).
Migration Options
The first thing you need to do when you decide you want to add more openness to your Guardian
application is to decide how far you can or want to migrate your application. The options available
are as follows:
• Add open functions to the Guardian application
• Set up a communication channel with an OSS application
• Migrate the Guardian application to the OSS environment
Some features are not supported in the OSS environment; thus, applications that depend on these
features cannot be migrated to the OSS environment. For example, process pairs are not supported
in the OSS environment.
However, even for programs that cannot be migrated completely to Open System Services, the
use of open functions can make your program more open and easier to integrate with other open
programs in the future.
General Migration Guidelines 137