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
Interoperating Between User Environments
Open System Services Porting Guide—520573-006
4-25
Manipulating Guardian Files From the OSS Shell
Normally, when files are copied to /G, the file has the date and timestamp of when the
copy occurred. If the -Wclobber parameter is specified, cp sets the date and
timestamp to that of the from file.
The file Utility
You can use the OSS file utility to detect Guardian file types. File types in /G are
based on the Guardian file codes (types). The following command displays the
pathname of the file and the file type:
file /G/data01/stu01/teditpfl
The ls Utility
The OSS ls utility lists and generates statistics for files. You can use the -W parameter
and a /G filename to display a Guardian file type. No other ls flags can be specified
with the -W parameter; it is reserved for only Guardian files.
The following ls utility example is followed by its output:
ls -W /G/data01/stu01/report
/G/data01/stu01/report 101
The mv Utility
Use the OSS mv utility moves the location of files and directories and renames them.
You can use mv to rename filenames in /G only if the specified filenames reside within
the same volume.
The following is an example of using the mv utility within /G:
mv /G/data01/stu01/record /G/data01/stu01/record2
The pax Utility
With the pax utility, you can specify Guardian files for archiving by using the /G syntax.
Files with file types 0 and 180 are copied unmodified; files with file types 101 (EDIT
files) are converted to ASCII text files that are compatible with OSS; all other Guardian
files are ignored. Files restored in /G are given file type 0.
When files with OSS pathnames are restored into the Guardian file system, the
pathnames are converted and truncated (if necessary) into compatible Guardian
filenames.
To specify a tape drive, specify the -f parameter with a name in /G. In the following
example, /G/tape represents the Guardian process name $TAPE:
pax -f /G/tape
pax has implemented tape disposition flags: -W clobber, -W norewind,
-W unload, -W nounload, -W wait, and -W nowait (default). If -W wait is