Exchange/RJE Manual

User-Exit Procedure
Example Programs
104698 Tandem Computers Incorporated D–19
User-Exit Procedure This section contains information about the interface to the user-exit procedure, some
guidelines for writing your own user-exit procedure, and an example user exit
procedure.
User-Exit Procedure
Interface Specification
The function of the user-exit procedure is to instruct an autodial modem to dial the
telephone or perform other special processing (such as dialing a non-standard ACU) to
establish the connection over the switched line. Once the connection has been
established or an error has occurred, the routine returns control to Exchange/RJE. The
user-exit procedure indicates its success or failure by the value it returns. A zero value
indicates success. A positive nonzero value indicates an error occurred. If an error is
returned, the Exchange/RJE command interpreter displays message RJCI66 (dataset
not ready) in its out file. A negative value must never be returned by the user-exit
procedure.
Here is the interface for the user-exit procedure:
INT PROC user^exit^modem^support ( line^fnum, phone^number,
phone^number^len, out^file^name);
INT line^fnum;
STRING .phone^number;
INT phone^number^len;
INT .out^file^name;
Each parameter is explained below.
line^fnum
This is the file number of the communications line, and it is the file number to be
used by the user exit code in all file system calls that operate on the line.
Exchange/RJE opens the line for nowait I/O before passing control to the user-exit
procedure. When using the AWAITIO procedure to complete any I/O operations
initiated by the user-exit procedure, the file number parameter of the AWAITIO
procedure must equal line^fnum. The user-exit procedure must not close the
line, even if an error occurs.
phone^number
This is the telephone number to be dialed. The number is formatted exactly as the
user entered it; Exchange/RJE does not alter the number or remove any characters.
Your user-exit procedure may edit or alter the number.
The number is padded with blanks on the right. It contains leading blanks if the
number was originally entered with leading blanks.