Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (n - p) PUT_FILE_OPEN_(2)
NAME
PUT_FILE_OPEN_ - Establishes a communication path between an application process and a
file
LIBRARY
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll
SYNOPSIS
[#include <cextdecs.h>]
#include <pthread.h>
short PUT_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,
int elections);
PARAMETERS
filename | pathname
The filename parameter 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.
The pathname parameter specifies the OSS filename or pathname of an OSS file
to be opened. The value of the pathname parameter is terminated by a null char-
acter. 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.
The filenum parameter is used as an input parameter only when you are attempt-
ing a backup open. In that case, you must supply the primary_proce sshandle
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 5−199