Open System Services Programmer's Guide

Odd-unstructured files and EDIT files are opened as OSS regular files.
If you want your application to modify odd-unstructured Guardian files, or if your application uses
data stored in odd-unstructured Guardian files or EDIT files, you can use the interoperability
capabilities of the OSS environment and access these files with OSS functions. If you need to
modify EDIT files or open structured files, you can use Guardian procedures as described in
ā€œAccessing Files From the Guardian APIā€ (page 68).
NOTE: Optical disks are inaccessible directories in /G. This means that OSS functions cannot
open, create, or read files in directories under /G when the files reside on optical disks.
As an alternative to using Guardian procedures when you cannot accomplish a task with OSS
functions, you might be able to accomplish the task with the Guardian C functions. Write a
separately compiled module using Guardian C functions and link (bind) this module into the OSS
program. Whether you should do this depends on whether you can accomplish the required set
of operations with Guardian C functions. Refer to Chapter 1 (page 26) for more information about
calling Guardian C functions from G-series TNS OSS programs.
Example 19 (page 67) shows how to read a Guardian file with OSS function calls; in this case,
open() and read(). The Guardian file is accessed through the /G directory.
66 Managing Files