Envoy ACP/XF Application Programming Manual
System Procedure Call Specifics for EnvoyACP/XF
EnvoyACP/XF Application Programming Manual–132179
4-13
SETMODE Procedure
Condition Codes 
Examples
In the following example, fnum is the number returned by the OPEN call that opened 
the communications line, and in^buffer is the name of the integer array within the 
application program into which EnvoyACP/XF places the received data. The read-
count of 102 specifies that the application program accepts an incoming frame 
containing up to 100 bytes of data (remember that this count also includes the two-byte 
MCW).
CALL READ (fnum,in^buffer,102);
The next example is the same as the preceding one except that the READ call includes 
count^read, the name of an integer variable into which EnvoyACP/XF places a value 
specifying how many bytes were actually deposited into the application buffer. If an I-
frame containing 75 bytes of data is received, count^read is set to 77 (remember that this 
count also includes the 2-byte MCW). However, if the incoming frame is an 
unnumbered command or response (such as a UA or a SABM), count^read is set to 
2.
CALL READ (fnum,in^buffer,102,count^read);
SETMODE Procedure
A call to the SETMODE procedure defines one or more line characteristics, such as the 
line type (point-to-point switched, point-to-point nonswitched, or multipoint), the station 
type (primary/supervisor or secondary/tributary), the maximum frame size, the number 
of retries, and the timeout duration.
You also can call SETMODE to establish an extended address field. 
If there are nowait requests incomplete when the application processes a SETMODE 
call, the EnvoyACP/XF rejects the SETMODE request with CCL and a file-system error 
code of 160 (request invalid for line state).
SETMODE requests that affect basic line characteristics, such as the electrical interface 
being used, cause the EnvoyACP/XF line to reset and place all defined stations in the 
disconnect state. The application process then must issue a CONTROL 13 to reenable 
the link. The SETMODE function codes that reset the link are indicated by an asterisk in 
Table 4-4
.
=  (CCE)  indicates that the READ[X] procedure was executed successfully.
= (CCL)  indicates that an error occurred (call FILE_GETINFO_).
Note. SDLC does not support extended address fields.










