Distributed transaction routing sample programs

The CICS®-supplied sample distributed routing program is named DFHDSRP. The corresponding copybook that defines the communications area is DFHDYPDS.

Where you see nn, the nn indicates the CICS version and library is the library name. For example, CICSTS64.CICS.SDFHLOAD.

There are assembler-language, COBOL, PL/I, and C source-level samples and copybooks. The supplied programs and copybooks, and the libraries in which they can be found, are summarized in the following tables.

Table 1. Distributed routing programs
Language Member name Library
Assembler DFHDSRP CICSTSnn.CICS.SDFHSAMP
COBOL DFHDSRP CICSTSnn.CICS.SDFHCOB
PL/I DFHDSRP CICSTSnn.CICS.SDFHPL1
C DFHDSRP CICSTSnn.CICS.SDFHC370
Table 2. Copybooks
Language Member name Library
Assembler DFHDYPDS CICSTSnn.CICS.SDFHMAC
COBOL DFHDYPDS CICSTSnn.CICS.SDFHCOB
PL/I DFHDYPDS CICSTSnn.CICS.SDFHPL1
C DFHDYPDS CICSTSnn.CICS.SDFHC370

You can write your own distributed routing program in COBOL, PL/I, C, or assembler language, and you can change the name of the program.

When invoked with DYRFUNC set to 0, the sample programs accept the SYSID that is passed in field DYRSYSID of the communications area, and set DYRRETC to 0 before returning to CICS. When invoked with DYRFUNC set to 2, 3, 5, or 6, they set a return code of 0. When invoked with DYRFUNC set to 1 or 4, they set a return code of 8.

If you want to route requests dynamically, you must customize DFHDSRP, or replace it completely with your own routing program.