Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-33
WRITE[X]
The form of the WRITE[X] procedure is:
filenum input
INT:value (Use with WRITE and WRITEX)
is the number returned by the OPEN call that opened the line. In a WRITE[X] call,
you supply this variable to Envoy.
buffer input
INT:ref:* (Use with WRITE)
STRING .EXT:ref:* (Use with WRITEX)
is the name of the integer array in the application program from which the outgoing
data is to be retrieved. The buffer's first two bytes contain the MCW.
write-count input
INT:value
specifies how many bytes are to be retrieved from the application buffer. You supply
this value to Envoy.
Note that this value must include the two bytes used for MCW.
count-written output
INT:ref:1 (Use with WRITE)
INT .EXT:ref:* (Use with WRITE)
is for wait I/O only. count-written returns a count specifying how many bytes were
actually transmitted. Note that this value, like the write-count, also includes the two
bytes used for the MCW.
tag input
INT(32):value (Use with WRITE and WRITEX)
is for nowait I/O only. tag is a double-word integer value that you supply; it
uniquely identifies the particular nowait WRITE[X] call.
Condition Codes
CALL WRITE[X]( filenum !i
, buffer !i
, write-count !i
,[count-written] !o
,[tag]); !i
< (CCL) Indicates that an error occurred (call FILEINFO).
= (CCE) Indicates that the WRITE procedure was executed successfully.