Exchange/RJE Manual

Programming Considerations
Using the Exchange/RJE Programmatic Interface
4–2 104698 Tandem Computers Incorporated
Programming
Considerations
This subsection discusses those programming considerations that apply particularly to
writing programs that use the Exchange/RJE programmatic interface. For a general
discussion of programming on Tandem NonStop systems, see the Guardian
Programmer’s Guide.
Using the User Library The user library contains the user-exit procedure USER^EXIT^MODEM^SUPPORT.
The default procedure shipped in RJELIB does nothing. You can write your own
procedure to control an autodial modem or to perform other processing necessary to
establish a connection. USER^EXIT^MODEM^SUPPORT is called automatically
when you supply a telephone number in the DIAL parameter of the CONNECT
command. For information about designing your own user-exit procedure and for an
example procedure, see Appendix D.
Wait and Nowait I/O
Operations
As with any file, you can perform I/O operations on the Exchange/RJE line server
either as wait I/O operations or as nowait I/O operations. You select the type of I/O
operation you want when you open the line server. After you have opened the line
server, the same procedure calls are used to perform either wait or nowait I/O
operations, depending on how you opened the line server.
Wait I/O Operations
The following steps describe how wait I/O operations are performed.
1. Your program makes a call to a procedure that performs an I/O operation, such as
READ.
2. The operating system suspends the execution of your program and sends a
message initiating the I/O operation to the appropriate process. This process is
the Exchange/RJE line server for I/O operations using the Exchange/RJE
programmatic interface.
3. The process performs the I/O operation.
4. When the process has finished the I/O operation, it passes a message to the
operating system indicating the completion of the I/O operation.
5. The operating system sets the condition code indicating the success or failure of
the I/O operation and resumes the execution of your program.
Nowait I/O Operations
The following steps describe how nowait I/O operations are performed.
1. Your program makes a call to a procedure that performs an I/O operation, such as
READ.
2. The operating system suspends the execution of your program and sends a
message initiating the I/O operation to the appropriate process. This process is
the Exchange/RJE line server for I/O operations using the Exchange/RJE
programmatic interface.