Envoy ACP/XF Application Programming Manual

System Procedure Call Specifics for EnvoyACP/XF
EnvoyACP/XF Application Programming Manual132179
4-22
WRITE[X] Procedure
Examples
In the following example, the write-count of 102 specifies that an I-frame
containing 100 bytes of data is to be transmitted (remember that this count also includes
the 2-byte MCW). fnum is the 1-word integer variable specified in the OPEN call that
opened the communications line and out^buffer is the name of the integer array
within the application program from which the outgoing data is to be retrieved.
CALL WRITE (fnum,out^buffer,102);
The following example is the same as the preceding one except that the WRITE[X] call
includes count^written, the name of an integer variable into which EnvoyACP/XF
places a value specifying how many bytes EnvoyACP/XF actually retrieved from the
buffer and transmitted to the remote station. For successful completions,
count^written must be the same as write-count. If an error occurs that
prematurely terminates the message transfer, count^written differs from write-
count.
CALL WRITE (fnum,out^buffer,102,count^written);
Depending upon the type of error, count^written may or may not contain a useful
value; for example, count^written can contain the value zero when, in fact, one or
more bytes were transmitted.
26 %32 nonreserved 3 nonreserved 3
28 %34 TEST TEST
31 %37 BCN (an IBM
command)
Table 4-5. MCW Values for U-Frame Command/Response Codes (page 2 of 2)
MCW.<3:7>
Decimal Value
MCW.<3:7>
Octal Value
U-Frame
Command U-Frame Response