Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (n - p) PUT_FILE_OPEN_(2)
DEFINE Considerations
• The filename or pathname parameter can be a DEFINE name; PUT_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
PUT_FILE_OPEN_(). For more information about DEFINEs, see Appendix E of the
Guardian Proc edure Calls Reference Manual.
• 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 with 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.
• You can open OSS files 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 = PUT_FILE_OPEN_ ( filename, filenum );
RETURN VALUES
The PUT_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 the Guardian FILE_OPEN_ procedure call can
return. It can also return the following error number:
12 Callback has already been registered for this filenum.
Some error numbers are warnings (that is, they indicate conditions that do not prevent the file
from being opened); check the value returned for the filenum parameter to determine whether the
file was opened successfully. Forexplanation of other error numbers returned, see the Guardian
Procedure Errors and Messages Manual.
ERRORS
None. This function does not set the errno variable.
RELATED INFORMATION
Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_CLOSE_(2),
PUT_LOCKFILE(2), PUT_LOCKREC(2), PUT_READLOCKX(2),
PUT_READUPDATELOCKX(2), PUT_READUPDATEX(2), PUT_READX(2),
PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2),
PUT_WRITEREADX(2), PUT_WRITEUPDATEUNLOCKX(2),
PUT_WRITEUPDATEX(2), PUT_WRITEX(2).
527186-023 Hewlett-Packard Company 5−211