Exchange/RJE Manual

Step-by-Step Instructions
Using the Exchange/RJE Programmatic Interface
4–10 104698 Tandem Computers Incorporated
The BLOCKSIZE parameter, together with the default value BLOCKING OFF,
specifies that the line server is to operate in block mode without blocking; it also
specifies the maximum block size, which is 2048 bytes in this example.
Using the NEWPROCESS Procedure
Your program can start the Exchange/RJE line server by calling the NEWPROCESS
procedure. If you are using your own user exit procedure, you can specify the location
of the user library in the call to NEWPROCESS. For a complete description of the
NEWPROCESS procedure, see the Guardian Procedure Calls Reference Manual. For a
description of how to use the NEWPROCESS procedure to start an Exchange/RJE line
server, see Section 5.
Note The parameter names used here are the parameter names used in Section 5; the names used here vary
slightly from those used in the Guardian Procedure Calls Reference Manual to make the parameter
names more specific to their use with the Exchange/RJE programmatic interface.
Naming the Line Server. To start a line server, you must include the server name
parameter in the call to NEWPROCESS. The server name parameter names the line
server. A line server remains available for use after your program closes it, unless you
have specified otherwise in a call to SETMODE. A named line server started by a call
to NEWPROCESS can be used by other programs including the Exchange/RJE
command interpreter.
Startup Message. If your program calls NEWPROCESS to start a line server, your
program must send a startup message to that line server. The startup message must
be the first message (call to WRITE or WRITEREAD) sent after your program opens
the line server. The startup message specifies the data communications line to be used
and the type of operation, 2780/3780 emulation, block mode with 2780/3780 blocking,
or block mode without blocking, to be performed by the line server. For more
information on the required startup message, see “Step 3: Send a Startup Message to
the Line Server” later in this section.
Step 2: Open the Line
Server
Steps 2, 3, and 4 are only required if your program calls the NEWPROCESS procedure
to start the line server. If the line server was started by the command interpreter, the
RJESV command, or another program (or during a previous execution of your
program), omit steps 2, 3, and 4.
After the line server has been started, your program must open the line server to be
able to communicate with it.
To open the line server, call the OPEN procedure. For a complete description of the
OPEN procedure, see the Guardian Procedure Calls Reference Manual. For a detailed
description of how to use the OPEN procedure with Exchange/RJE, see Section 5.
In the call to the OPEN procedure, your program specifies whether wait or nowait I/O
operations will be performed with the line server. If you specify nowait I/O
operations, you are limited to one outstanding I/O operation at a time against the line
server.