Guardian Application Conversion Guide

Opening and Communicating With a High-PIN Server
Converting C Applications
096047 Tandem Computers Incorporated 5–19
Note If the file-name input parameter is incomplete (that is, not fully qualified), FILE_OPEN_ uses the current
settings, including the system name, in the =_DEFAULTS DEFINE for the unspecified parts.
FILE_OPEN_ also accepts a DEFINE name that represents a valid file name in this
format.
FILE_OPEN_ accepts an integer
options
parameter to specify certain file
characteristics. The
options
bit positions represent these options:
options
Bit Position Description
0 Allow unstructured access for a disk file (must be 0 for other files and devices)
1 Execute a nowait open
2 Do not execute an update when the file is opened
3 Use any available file number for backup open (0 means use the same file number as
in the primary open)
4 through 13 Reserved; must be 0
14 Receive C-series system messages ($RECEIVE only)
15 Do not receive process open and close system messages ($RECEIVE only)
The ZSYSC file contains constant declarations that you can use with the
options
parameter.
If you started the server using the PROCESS_CREATE_ procedure, you can use the
PROCESS_CREATE_ process-descriptor output parameter directly in the
FILE_OPEN_ procedure call (shown below as the
server_name
parameter). Refer to
“Creating and Managing a High-PIN Process” earlier in this section for details.
error = FILE_OPEN_(server_name,
server_length,
server_file_number,
exclusion_mode,
nowait_operations,
sync_depth,
options);
If you open the server using the nowait open option, you must call the AWAITIO[X]
procedure to complete the open. To determine the
error
and
options
values, call
the FILE_GETINFOLIST_ procedure and check the items specified by
ZSYS_VAL_FINF_LASTERROR and ZSYS_VAL_FINF_OPENOPTS, respectively
(provided you use the ZSYSC file).