Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
reading and writing of both even and odd byte counts and positioning to both even and odd
byte addresses. Unstructured files do not have a built-in record structure.
• EDIT files (file type 101). These files are unstructured. You can access them only for reading.
• Telnet processes.
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 78).
As an alternative to using Guardian procedures when you cannot perform a task with OSS functions,
you might be able to perform the task with the Guardian C functions. Write a separately compiled
module using Guardian C functions and link this module into the OSS program. Whether you can
do this depends on whether you can perform the required set of operations with Guardian C
functions. Refer to the Open System Services Programmer’s Guide for more information about
calling Guardian C functions from OSS programs; it includes examples of reading a Guardian
file with an OSS function call.
Opening Guardian Files
On G06.29 and later G-series RVUs, H06.06 and later H-series RVUs, and J-series RVUS, OSS
can use the creat64() and open64() functions to create Guardian files in the /G name space.
The resulting files, regardless of size, are Guardian Format 2 files with file code 180. If a program
running on any RVU attempts to open this type of file using FILE_OPEN_ without 64-bit elections,
the open succeeds if the file is smaller than approximately 4 gigabytes and fails if the file is larger
than 4 gigabytes.
If the open call includes 64-bit elections and is issued on G06.29 or a later G-series RVU, a H06.06
or a later H-series RVU, or a J-series RVU, the open succeeds regardless of file size.
If an application running on an RVU earlier than G06.29 or H06.06 invokes FILE_OPEN_ with
64-bit elections, the open succeeds. However, if the file size is smaller than 4 gigabytes, the file
size limit for that open is 4 gigabytes. If the file size is larger than 4 gigabytes, the file size limit
for that open is the limit defined when the file was created.
For detailed information about size limits when opening files, see the Open System Services
Management and Operations Guide.
Accessing Files From the Guardian API
Accessing Guardian Files
Guardian files can be managed from the Guardian API as described in the Guardian Programmer’s
Guide and the Guardian Procedure Calls Reference Manual.
Accessing OSS Files
OSS files can also be managed from the Guardian API. You would use Guardian procedures to
access OSS files when you need to perform operations that use the nowait feature of the Guardian
environment.
Nowait I/O is the ability of an application process to continue executing in parallel with read and
write operations; the application process runs concurrently with the I/O operation. The OSS
environment uses waited I/O, where an application process is suspended during read and write
operations. The process does not resume execution until the I/O operations are complete. Nowait
I/O does not work on files that have been opened with the OSS open() or open64() functions.
When you use a Guardian I/O procedure in nowait mode, you set the maximum number of
concurrent I/O operations that you want to allow and then complete the I/O operations by calling
78 Interoperating Between Programming Environments