Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
8 Migrating Guardian Applications to the OSS Environment
Guardian programs for NonStop systems have been written in a number of programming languages,
including TAL, C, C++, and Cobol85. You can make programs more open by using OSS features
in the Guardian environment, or even migrate the programs to run in the OSS environment.
There are basically two ways to migrate an existing Guardian TNS program:
• Migrate the Guardian TNS program to the Guardian native environment.
• Migrate the Guardian TNS program to the OSS native environment.
Programs compiled with a native C compiler and targeted for the native environments, OSS or
Guardian, provide performance improvements over the TNS environment. Thus it is highly
recommended that you port your C or C++ programs to the native environment, rather than making
changes for the TNS environment. Note also that on systems running J-series or H-series RVUs,
OSS does not support the TNS environment. Therefore, when migrating a Guardian TNS program
to OSS on a system running H-series or J-series RVUs, you must migrate the program to the TNS/E
native environment.
This chapter addresses programmers who wish to migrate their Guardian TNS programs developed
for the TNS environment to the Guardian or OSS native environment.
The topics for This chapter are:
• “General Migration Guidelines” (page 136)
• “C Compiler Issues for Guardian Programs” (page 139)
• “Using New and Extended Guardian Procedures” (page 143)
• “Using OSS Functions in a Guardian Program” (page 146)
• “Interoperating With OSS Programs” (page 149)
• “Starting an OSS Program From the Guardian Environment” (page 152)
• “C Compiler Considerations for OSS Programs” (page 155)
• “Porting a Guardian Program to the OSS Environment” (page 158)
This chapter can be used by Guardian environment C or C++ programmers interested in either
adding more open features to their Guardian C programs, migrating their C programs from the
Guardian environment to the OSS environment, or simply interoperating with OSS programs.
Programmers are provided with a general set of guidelines to follow in determining the degree of
migration that should be attempted, and the issues which must be considered to perform the
migration.
If you are planning to take advantage of 64-bit OSS processes and 64-bit addressable memory
features that are available beginning with the H06.24 and J06.13 RVUs, see the 64-Bit Support
in OSS and Guardian chapter in the Open System Services Programmer's Guide.
General Migration Guidelines
There are a number of issues that you must consider when migrating a Guardian application to
have better access to open features. In some cases, you may want to 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.
136 Migrating Guardian Applications to the OSS Environment