Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (W-Z)
Guardian Procedure Calls Reference Manual—522629-013
16-7
WRITE[X] Procedures
tag input            
INT(32):value (Use with WRITE and WRITEX)
is for nowait I/O only. 
tag is a value you define that uniquely identifies the 
operation associated with this WRITE[X].  
Condition Code Settings
< (CCL) indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).
< (CCL) is returned following successful insertion or update of a record in a 
file with one or more insertion-ordered alternate keys if a duplicate key 
value was created for at least one insertion-ordered alternate key. A call to 
FILE_GETINFO_ or FILEINFO shows that error 551 occurred; this error is 
advisory only and does not indicate an unsuccessful write operation.
= (CCE) indicates that the WRITE[X] is successful.
> (CCG) indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).
Considerations
•
WRITE versus WRITEX
Use WRITE when the buffer has a 16-bit address, and use WRITEX when the 
buffer has a 32-bit extended address. Therefore, the data buffer for WRITEX can 
be either in the caller’s stack segment or any extended data segment.
•
Waited I/O and WRITE[X]
If a waited WRITE[X] is executed, the 
count-written parameter indicates the 
number of bytes actually written.
•
Nowait I/O and WRITE[X]
If a nowait WRITE[X] is executed, 
count-written has no meaning and can be 
omitted. The count of the number of bytes written is obtained when the I/O 
operation completes through the 
count-transferred parameter of the 
AWAITIO[X] procedure.
The WRITE[X] procedure must complete with a corresponding call to the 
AWAITIO[X] procedure when used with a file that is opened nowait. If WRITEX is 
used, you must call AWAITIOX to complete the I/O. If WRITE is used, you can use 
either AWAITIO or AWAITIOX to complete the I/O.
Note. The system stores this tag value until the I/O operation completes. The system then 
returns the tag information to the program in the tag parameter of the call to AWAITIO[X], 
thus indicating that the operation completed. If WRITEX is used, you must call AWAITIOX to 
complete the I/O. If WRITE is used, you can use either AWAITIO or AWAITIOX to complete the 
I/O.










