OpenTP1 Version 7 Programming Reference C Language
dc_ist_write - Output an internode shared table record
Format
ANSI C, C++
#include <dcist.h> int dc_ist_write (int istid, struct DC_ISTKEY *keyptr, int keyno, char *bufadr, int bufsize, DCLONG flags) |
K&R C
#include <dcist.h> int dc_ist_write (istid, keyptr, keyno, bufadr, bufsize, flags) int istid; struct DC_ISTKEY *keyptr; int keyno; char *bufadr; int bufsize; DCLONG flags; |
Description
The function dc_ist_write() outputs a record in a specified range to an internode shared table. If multiple records are collectively specified and an error occurs with any of the specified records, the function dc_ist_write() returns with an error without outputting the records to the output buffer.
When the function dc_ist_write() terminates normally, the contents of the record at the local node are updated. The contents of internode shared tables at other nodes are updated with a certain time interval after this function returns normally.
When outputting an internode shared table record, specify the table descriptor which is the return value of the function dc_ist_open().
Arguments whose values are set in the UAP
istid
Specify the table descriptor of the internode shared table to be accessed.
keyptr
Specify the address of the structure (IST key) indicating the range of the relative record numbers of the record to be output. For the structure, specify the record range with the first and last relative block numbers. The structure formats are as follows:
struct DC_ISTKEY { int fstrecno; int endrecno; }; |
keyno
Specify the number of structures (number of arrays in the structure) to be specified for keyptr.
bufadr
Specify the address of the buffer containing update data to be output.
bufsize
Specify the output buffer length. The value must be (output record length x number of output records).
flags
Specify DCNOFLAGS.
Return values
Return value | Return value (numeric) | Explanation |
---|---|---|
DC_OK | 0 | All specified records are normally output. |
DCISTER_PROTO | -3800 | The call sequence of functions which access the internode shared table is invalid. |
DCISTER_BADID | -3803 | The table descriptor specified for istid is not the one which was acquired by opening the table normally. |
The internode shared table is not open. | ||
DCISTER_BUFER | -3804 | The output buffer length specified for bufsize is insufficient to output all records. |
DCISTER_RNOER | -3806 | The relative record number is invalid. |
DCISTER_NOMEM | -3807 | The memory became insufficient. |
DCISTER_PARAM_KEYNO | -3809 | The value specified for keyno is less than 1. |
DCISTER_PARAM_FLAGS | -3811 | The value specified for flags is invalid. |
DCISTER_BUFOV | -3841 | The output buffer length is greater than the total length of records to be output. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.