Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide—520573-006
8-4
Using OSS Functions in a Guardian Program
Using OSS Functions in a Guardian Program
More open features are available to a Guardian program with the use of OSS
functions, most of which can be called from a Guardian program. Refer to the API
interoperability tables in the Open System Services Programmer’s Guide for a
complete list of OSS functions that you can use to provide open features to Guardian
programs. Moreover, Guardian processes can take on some OSS attributes. Many of
these attributes can be manipulated only using OSS functions, which are noted in the
interoperability tables.
Communicating With OSS Programs
Another way to build more openness into your Guardian application is to support
communication capabilities with OSS programs by using any one of a number of IPC
mechanisms described in some detail in Section 6, OSS Porting Considerations. The
use of these communication mechanisms, along with the ability to create OSS
processes from the Guardian environment, give Guardian programs a significant
degree of interoperability with OSS programs.
Migrating a Guardian Program to the OSS Environment
The greatest degree of openness is provided by migrating the Guardian application to
run in the OSS environment. Before migrating your Guardian application to the OSS
environment, make sure that the Guardian functions used by your application either
are supported in the OSS environment or can be replaced by equivalent OSS
functions. If the functions used by the Guardian application cannot be used in the OSS
environment, they must be replaced with equivalent OSS functions in order to migrate
the application. If the Guardian application is started from the Guardian environment in
a manner not supported in the OSS environment, for example by using ASSIGNs,
DEFINEs, PARAMs, or system startup messages, this capability will need to be
provided by equivalent mechanisms in the OSS environment.
The features of a specific product used by your application might also impose
migration considerations. For example, migration of a SQL/MP or SQL/MX program to
the OSS environment requires considerations about security mechanisms, use of
filenames, recompiling the application, use of certain commands and statements, and
so forth. Refer to the SQL/MP Programming Manual for C or the SQL/MX
Programming Manual for C and COBOL for more information about SQL/MP or
SQL/MX applications in the OSS environment.
C Compiler Issues for Guardian Programs
The Guardian C or C++ programmer has typically used the TNS compiler tools
available in the Guardian environment to build TNS programs. To add open features
and performance to a Guardian TNS program, it is recommended that the programmer
use the native compilation tools described in the C/C++ Programmer’s Guide. The
differences between these two sets of tools are discussed in Section 2, The