Exchange/RJE Manual

Step-by-Step Instructions
Using the Exchange/RJE Programmatic Interface
4–14 104698 Tandem Computers Incorporated
Step 6: Establish a
Connection
Your program must establish a connection between the line server and the data
communications line before your program can use the line server to communicate over
the line. To do this, call the SETMODE procedure with the function parameter equal
to 41.
In addition to establishing the connection with the data communications line,
SETMODE function 41 also indicates whether or not an ACU is to be used to dial the
telephone number of the remote system. If you do use an ACU, the call to SETMODE
function 41 must be followed by a call to WRITE (or WRITEREAD) that passes the
telephone number to the line server. If you do use an ACU, you must include the ACU
parameter in the startup message. For more information on using an ACU, see the
SETMODE procedure in Section 5.
If you are using your own user exit, you need to set the parameter in SETMODE 41 to
indicate that a telephone number will follow. Then follow the call to SETMODE 41
with a call to WRITE containing the appropriate telephone number. (You use the user
library if you need to control an autodial modem or perform other processing to
establish the connection.)
If your program communicates with only one remote system, your program needs to
call SETMODE function 41 only once to establish a connection. However, if your
program uses a switched data communications line and communicates with several
remote systems, your program needs to call SETMODE function 41 once to establish
each new connection. Of course, each old connection must be terminated before the
new connection can be established.
Step 7: Set the Operational
Parameters
Before your program sends data to or receives data from the remote system, your
program can set the parameters that control the send or receive operation. This is
done by calling the SETMODE procedure. Call SETMODE with the function
parameter equal to 42 to specify the parameters for a send operation (calls to WRITE).
Call SETMODE with the function parameter equal to 43 to specify the parameters for a
receive operation (calls to READ). For information on the parameters and how to
specify them, see the SETMODE procedure in Section 5.
If your program does not call SETMODE to assign values to the parameters for a send
operation or a receive operation, the line server uses the default values for the
parameters. See the SETMODE procedure in Section 5 for the default values.
Step 8: Perform the
Operation
This step is the performance of your program’s task, be it sending files, receiving files,
or both.
Sending Files
Use the WRITE procedure to pass records to the line server for transmission to the
remote system. The basic procedure for sending a file is outlined below.
1. Open the file to be sent.
2. Call READ (or WRITEREAD) and read a record from the file.