Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (W-Z)
Guardian Procedure Calls Reference Manual—522629-013
16-5
WRITE[X] Procedures
WRITE[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Disk File Considerations
Interprocess Communication Consideration
Considerations for WRITEX Only
Errors for WRITEX Only
Example
Related Programming Manuals
Summary
The WRITE[X] procedures write data from an array in the application program to an
open file (see “Considerations”).
The WRITE procedure is intended for use with 16-bit addresses, while WRITEX is
intended for use with 32-bit extended addresses. Therefore, the data buffer for
WRITEX can be either in the caller’s stack segment or any extended data segment.
Syntax for C Programmers
•
CEXTDECS (through the included file TNSINTH) defines 32-bit values as the
typedef __int32_t which for TNS and TNS/R compiles is defined as long and for
TNS/E compiles is defined as
int.
•
The function value returned by WRITE[X], which indicates the condition code, can
be interpreted by
_status_lt(), _status_eq(), or _status_gt() (defined
in the file
tal.h).
#include <cextdecs(WRITE)>
_cc_status WRITE ( short filenum
,short _near *buffer
,unsigned short write-count
,[ short _near *count-written ]
,[ __int32_t tag ] );
#include <cextdecs(WRITEX)>
_cc_status WRITEX ( short filenum
,const char *buffer
,short write-count
,[ short *count-written ]
,[ __int32_t tag ] );