Open System Services System Calls Reference Manual (G06.28+)
System Functions (s and S) SPT_FILE_OPEN_(2)
Opening an unconverted (C-series format) process from a high-PIN process
A high-PIN process cannot open an unconverted process unless the unconverted
process has the HIGHREQUESTERS object-file attribute set. If a high-PIN pro-
cess attempts to open a low-PIN process that does not have this attribute set, the
high-PIN process receives file-system error 560.
System Message
When a process is opened by either SPT_FILE_OPEN_() or the Guardian OPEN procedure, it
receives a process open message (unless it specified when opening $RECEIVE that it wants no
messages). This message is in D-series format (message -103) or in C-series format (message
-30), depending on what the receiving process specified when it opened $RECEIVE. This mes-
sage is also received if the backup process of a process pair performs an open. Therefore, a pro-
cess can expect two of these messages when being opened by a process pair.
The process handle of the opener can be obtained by a subsequent call to
FILE_GETRECEIVEINFO_. Refer to the
Guardian Procedure Errors and Messages Manual
for a description of the process open message.
DEFINE Considerations
• The filename or pathname parameter can be a DEFINE name; SPT_FILE_OPEN_()
uses the file name given by the DEFINE as the name of the object to be opened. If you
specify a CLASS TAPE DEFINE without the DEVICE attribute, the system selects the
tape drive to be opened. A CLASS TAPE DEFINE has other effects when supplied to
SPT_FILE_OPEN_(); see Appendix E of the Guardian Procedure Calls Reference
Manual for further information about DEFINEs.
• If a supplied DEFINE name is a valid name but no such DEFINE exists, the procedure
returns an error 198 (missing DEFINE).
• When performing a backup open of a file originally opened through the use of a
DEFINE, filename must contain the same DEFINE name. The DEFINE must exist and
must have the same value as when the primary open was performed.
Safeguard Considerations
For information on files protected by Safeguard, see the Safeguard Reference Manual.
OSS Considerations
• To open an OSS file by its pathname, set options bit 10 to 1 and specify the pathname
parameter.
• OSS files can be opened only with shared exclusion mode.
EXAMPLES
The open in the following example has the following defaults; waited I/O, exclusion mode
(shared), access mode (read/write), sync depth (0).
error = SPT_FILE_OPEN_ ( filename, filenum );
RETURN VALUES
The SPT_FILE_OPEN_() function returns 0 (zero) upon successful completion. Otherwise,
this function returns a nonzero Guardian file-system error number that indicates the outcome of
the operation.
This function can return any error number that can be returned by the Guardian FILE_OPEN_
procedure call. It can also return the following error number:
12 Callback has already been registered for this filenum.
527186-005 Hewlett-Packard Company 7−147