Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 2
An Introduction to the SIO Procedures
An Introduction to the SIO Procedures
An application process can use the following SIO procedures to sequentially access
files:
Refer to the Guardian Procedure Calls Reference Manual for complete details on the
procedures listed above.
Refer to the Guardian Procedure Errors and Messages Manual for details on specific
SIO errors. The SIO procedures may return these messages in addition to regular file-
system error messages.
FCBs for SIO Files
The SIO procedures access each file using a special file control block (FCB) in the
users data area. This FCB contains file information in addition to the information
contained in the FCB automatically created and managed by the file system. Each
SIO FCB must be programmatically created as described later in this section.
In addition to an FCB for each file, you also need a common FCB for the process. The
common FCB contains information common to all SIO files opened by the process.
This information includes the address of the FCB that receives error messages
generated by the SIO procedures.
CHECK^BREAK Checks whether the BREAK key has been pressed.
CHECK^FILE Retrieves characteristics and state information about SIO files.
CLOSE^FILE Closes a file that was opened for SIO.
GIVE^BREAK Disables BREAK processing by returning BREAK ownership to
the process that this process took the ownership from.
NO^ERROR Allows SIO processing of errors from non-SIO operations.
OPEN^FILE Opens a file for access by other SIO procedures. This
procedure can also assign file-transfer characteristics.
READ^FILE Reads a record into a read buffer from a file opened for SIO.
SET^FILE Sets or changes the characteristics of files accessed by the SIO
procedures. These characteristics include modes of access and
exclusion, file-transfer attributes, and mode of error processing.
TAKE^BREAK Enables BREAK processing by the process that issues the
TAKE^BREAK call. This call also disables BREAK processing
by the current BREAK owner.
WAIT^FILE Waits for the completion of an outstanding I/O operation initiated
on a file opened for nowait SIO.
WRITE^FILE Writes a record from a write buffer into a file opened for SIO.