Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-25
READ[X]
The form of the READ[X] procedure is:
filenum input
INT:value (Use with both READ and READX)
is the number returned by the OPEN call that opened the line. In a READ[X] call,
you supply this variable to Envoy.
buffer output
INT:ref:* (Use with READ)
STRING .EXT:ref:* (Use with READX)
is the name of the integer array in the application program where the incoming data
is to be placed.
read-count input
INT:value (Use with both READ and READX)
specifies how many incoming bytes can be placed in the application buffer. You
must supply this value to Envoy. Note that this value must include the two bytes
used for the MCW.
count-read output
INT:ref:1 (Use with READ)
INT .EXT:ref:1 (Use with READX)
is the name of a one-word integer variable into which Envoy sets a value specifying
how many bytes were actually placed in the application buffer. Note that this value,
like the read-count, also includes the two bytes used for the MCW.
tag input
INT(32):value (Use with both READ and READX)
is for nowait I/O only. tag is a double-word integer value that uniquely identifies the
particular nowait READ[X] call. You supply this value to Envoy.
Condition Codes
CALL READ[X] ( filenum !i
, buffer !o
, read-count !i
,[ count-read] !o
,[ tag] ); !i
< (CCL) Indicates that an error occurred (call FILEINFO).
= (CCE) Indicates that the READ procedure was executed successfully.