Invoking the dynamic routing program on abend
If you have set DYROPTER to 'Y', and the routed transaction abends, the dynamic
routing program is invoked again to notify it of the abend. You could use this
invocation to initiate a user-defined program in response to the transaction abend.
If the routed transaction abends, the DFHAPRT program in the TOR:
1. Passes back a response to the CICS transaction manager indicating that a
transaction abend has occurred
2. If the dynamic routing program requested to be reinvoked at termination of the
transaction (by setting DYROPTER to 'Y' when invoked for routing), reinvokes
the dynamic routing program
3. Returns to CICS transaction manager.
Modifying the initial terminal data
The dynamic routing program should not perform an EXEC CICS RECEIVE or an
EXEC CICS GDS RECEIVE command, because this prevents the routed-to
transaction from obtaining the initial terminal data.
The CICS relay program, DFHAPRT, places a
copy
of the user’s initial terminal
input into a separate buffer. This information includes SNA presentation services
headers for APPC mapped and unmapped conversations. A pointer to this buffer
(DYRBPNTR), and its length (DYRBLGTH), are provided in the communications
area passed from DFHAPRT to the dynamic routing program.
Because the transaction profile has not been queried at this point, uppercase
translation has not been performed on the input data unless UCTRAN(YES) is
specified on the TYPETERM definition.
Sometimes you may want to modify the initial data input by the user. (It may be
necessary to do this if, for example, you change the ID of the remote transaction,
using field DYRTRAN of the communications area.) To modify the input data, your
routing program should, when invoked for route selection:
1. Copy the input data pointed to by DYRBPNTR into a named variable, of length
DYRBLGTH
2. Modify the data in the named variable
3. Use the INPUTMSG option of the EXEC CICS RETURN command to make the
modified data available to the application program.
For guidance information about using INPUTMSG on EXEC CICS RETURN
commands, see the other methods described in the
CICS Application Programming
Guide
. For programming information about the INPUTMSG option, see the
CICS
Application Programming Reference
manual.
Note: If, after modifying the input data, the dynamic routing program is reinvoked
because an error occurs in routing to the selected transaction, it should
“remember” that it has modified the original user-input.
Modifying the application’s communications area
Sometimes you may want to modify the routed application’s communications area.
For example, if your routing program changes the ID of the remote transaction, it
dynamic transaction routing
Chapter 16. Writing a dynamic routing program 555