Sample AO application (UETRANS)
A sample AO application is available from the IMS library (IMS.ADFSSRC, member
name UETRANS). The sample shows use of AOI by an AO application and
an associated AO exit routine. The AO application is written in PL/I
for the Optimizing Compiler.
The sample AO application:
- Accepts only messages originating from the exit routine (indicated
by a
CGPCB status code). - Upon receipt of a DFS994 message, looks for the character string
EMERGENCY. If found, it issues the command /RSTART LINE ALL. Otherwise, it issues the following commands:/RSTART LINE ALL /START DATABASE ALL /START TRAN ALL - Upon receipt of a terminal error message, it issues the command /RDISPLAY to determine on which line and PTERM is the master terminal. If the error occurred on that line, it issues a /DISPLAY LINE ALL command to determine the first available started line, and reassigns the master terminal to that line and PTERM.
- Upon receipt of an /ASSIGN command, if the response is a DFS119 message, reissues the command until it is successful. If the response is a DFS138 message, it restarts the line with an /RSTART command and reissues the /ASSIGN command. It reissues the /ASSIGN command a maximum of 20 times; if the command is not successfully completed after the 20th attempt, an appropriate message is issued.
The associated AO exit routine is assumed to:
- Pass all DFS994 (checkpoint identifier) messages to the AO application.
- Pass all terminal error messages to the AO application. The line number of the terminal in error is placed in the last 20 bytes of the buffer. Message numbers passed are DFS001, DFS025, DFS026, DFS027, DFS029, DFS072, DFS250, DFS251, DFS253, DFS260, DFS269, DFS973, DFS998.
- Pass all /ASSIGN commands that receive a DFS119 or DFS138 message to the AO application. These messages indicate that either the LTERM is busy or the line is not started and cannot be reassigned.
- Ignore all other messages.