Exchange/RJE Manual

User-Exit Procedure
Example Programs
D–20 104698 Tandem Computers Incorporated
phone^number^len
This is the length of the telephone number, including leading blanks if any. The
line server does not scan the telephone number to get the length. The length is
obtained from the write count that is passed when the programmatic interface or
the Exchange/RJE command interpreter calls WRITE to pass the telephone
number to the line server.
out^file^name
This is the name, in internal-name format, of the line server’s out file. At the time
control is passed to the user-exit procedure, the line server does not have its out
file open. The user-exit procedure can open the out file and write to it in order to
display status and error messages. If the user-exit procedure opens the out file,
the procedure should close the file before returning control to Exchange/RJE.
Guidelines for Writing
User-Exit Procedures
The user-exit procedure talks to the CP6100 (or Envoy) I/O process in order to instruct
an autodial modem to dial the telephone and to establish the connection over the
switched line. Therefore, when you are building messages to be sent to an autodial
modem, the user-exit procedure should follow the CP6100 (or Envoy) BSC message
format requirements. Also, when you are receiving messages from the modem, follow
the BSC message format to distinguish text from control characters. Refer to the
CP6100 BSC Programming Manual or the Envoy Byte-Oriented Protocols Reference Manual
for more information.
Exchange/RJE sets the configuration of the switched line before invoking the user-exit
procedure. Any other CONTROL requests required to establish the connection, such
as raising DTR, must be initiated by the user-exit procedure.
In case the connection is not made, the user-exit procedure must make a CONTROL
request to disconnect the line before returning control to Exchange/RJE. This is to
ensure that the user-exit procedure leaves the CP6100 (or Envoy) I/O process in the
same state as it was when the user-exit procedure was invoked. Failure to disconnect
after an error leaves the line in an unusable state.
Error Handling
If an error is returned by the user-exit procedure, the Exchange/RJE line server passes
the error code returned by the user-exit procedure to the programmatic application or
the Exchange/RJE command interpreter. In order to avoid conflict with the error
codes used by Exchange/RJE, your user-exit procedure should return errors in the
range 350 through 510 and greater than 1000. (The command interpreter assumes that
errors in these ranges are returned by the user-exit procedure. )
The Exchange/RJE command interpreter either retries or aborts the dialing operation
depending on the error code returned by the user-exit procedure.