Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) SPT_FILE_OPEN_(2)
NAME
SPT_FILE_OPEN_ - Establishes a communication path between an application process and a
file
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <cextdecs.h>]
#include <spthread.h>
short SPT_FILE_OPEN_ (
{ const char *filename | const char *pathname },
short length,
short *filenum,
[ short access ],
[ short exclusion ],
[ short nowait_depth ],
[ short sync_or_receive_depth ],
[ short options ],
[ short seq_block_buffer_id ],
[ short seq_block_buffer_len ],
[ short *primary_processhandle ],
[ long elections ]
);
PARAMETERS
filename | pathname
filename specifies the Guardian filename of a Guardian file to be opened. The
value of filename must be a valid fully or partially qualified file name or DEFINE
name. If the name is partially qualified, it is resolved using the contents of the
=_DEFAULTS DEFINE.
pathname specifies the OSS filename or pathname of an OSS file to be opened.
The value of the pathname parameter is terminated by a null character. options
bit 10 must be set to 1 to open an OSS file.
filenum returns a Guardian file number that is used to identify the Guardian file open
instance in subsequent Guardian file-system calls. If the file cannot be opened, a
value of -1 is returned.
filenum is used as an input parameter only when you are attempting a backup
open. In that case, you must supply the primary_processhandle parameter or
else the input value of filenum is ignored. For a backup open, the value specified
for filenum must be the filenum value that was returned when the file was opened
by the primary process. If a backup open is successful, the input value of filenum
is returned unless options bit 3 is set, in which case a new file number is assigned
for the backup open. If the backup open is unsuccessful, -1 is returned.
access Specifies the desired access mode for the file to be opened. Valid values are:
0 Read-write
527186-023 Hewlett-Packard Company 7191