It is good practice to use a single, common definition
for all remote transactions that are to be dynamically routed.
The name of the common definition is specified on the DTRTRAN system
initialization parameter. You can use the REMOTESYSTEM
option of the common definition to specify a default AOR to which
transactions are to be routed. For information about defining remote
transactions for dynamic transaction routing, see Defining remote resources.
Important: To route a transaction defined by the DTRTRAN
definition, your dynamic routing program must set the DYRDTRRJ field
of the communications area to 'N' (the default is 'Y'). If you leave
DYTDTRRJ set to 'Y', the transaction is rejected.
You can test the DYRDTRXN field to check if the transaction
passed to your routing program is defined by the DTRTRAN definition. Figure 1 contains skeleton code for
routing transactions defined by DTRTRAN. Figure 1. Example
pseudocode to route transactions defined by DTRTRAN
if DYRDTRXN='Y' then /* Is DYP invoked because of DTRTRAN */
do /* .. Yes */
Call Find_AOR(sysid) /* Select the SYSID of the AOR */
if rc=0 then /* Is AOR available? */
do /* .. Yes */
DYRRETC=RETCOD0 /* Set OK Return Code */
DYRSYSID=sysid /* Set the sysid */
DYRDTRRJ='N' /* Don't reject DTRTRAN defns */
... /* Set other commarea fields */
end /* */
else /* .. No */
... /* AOR unavailable logic */
end /* */