Open System Services System Calls Reference Manual (G06.28+, H06.05+)
SPT_WRITEUPDATEX(2) OSS System Calls Reference Manual
NAME
SPT_WRITEUPDATEX - Transfers data from an array in the application program to a Guar-
dian 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_WRITEUPDATEX (
short filenum,
char *buffer,
short write_count,
[short *count_written ],
[long tag ]
);
PARAMETERS
filenum specifies the file number of a Guardian file open instance that
identifies the file to be written.
buffer specifies an array in the application process in which the infor-
mation to be written to the file is stored before the call.
write_count specifies the number of bytes to be written.
count_written returns a count of the number of bytes written to the file from
buffer.
tag is for nowait I/O only. The tag value you define uniquely
identifies the operation associated with this call.
This parameter is supported only for program compatibility; if
you provide it, it is ignored.
DESCRIPTION
The SPT_WRITEUPDATEX() function is the thread-aware version of the Guardian WRI-
TEUPDATEX procedure.
The SPT_WRITEUPDATEX() function performs random processing of records in a Guardian
disk file. SPT_WRITEUPDATEX() has two purposes:
— To alter the contents of the record at the current position
— To delete the record at the current position in a key-sequenced or relative
file
Data from the application process’s array is written in the position indicated by
the setting of the current-record pointer. A call to this procedure typically fol-
lows a corresponding call to the SPT_READX() or SPT_READUPDATEX( )
function. The current-record and next-record pointers are not affected by the
SPT_WRITEUPDATEX() procedure.
For magnetic tapes, SPT_WRITEUPDATEX() is used to replace a record in an
already written tape. The tape is backspaced one record; the data from the
7−356 Hewlett-Packard Company 527186-007