Four programs are provided as a guideline for you to implement your own environmental wait routine. They can be found in the ASM and COBOL data sets distributed with TIBCO Object Service Broker. These programs are:
This is an initialization transaction program to bring up the Execution Environment and supply the address of the environmental wait routine (also located in this program). A significant portion of this program involves setting up the ninth parameter to the STARTEE call.
As this program contains the environmental wait routine it is extremely important that it be marked resident to your TP monitor. This insures that the code pointed to by HRNXDEP (the Entry Point of your wait routine) does not relocate in memory. It is also
mandatory that the environmental wait routine be written as
reentrant.
You can ensure that the environmental wait routine is resident by having the initialization program use CSA storage to LOAD the exit routine there, or use other facilities possibly available in your TP environment, such as making the program resident.
This transaction program is provided as the shutdown program. It should be executed as the last program to call TIBCO Object Service Broker. Failure to execute this program likely causes a System Abend Code A03.
Typically, this program would reside in your shutdown table. Its purpose is to tell the Execution Environment to shutdown. It first performs a STARTEE to initialize the HRNHLLWA work area, and performs the number of STOPEE calls required according to the program logic.
The Execution Environment maintains one internal counter, EECNT, for the number of STARTEE calls issued. When the shutdown program (S6BEWTSD) is executed, under normal circumstances there is one outstanding STARTEE call, from the initialization program (S6BEWTIN), plus one STARTEE call from this program. Therefore, the shutdown transaction must issue at least two STOPEE calls to quiesce the Execution Environment. The shutdown transaction contains logic to catch the situation where a user application program fails to issue a STOPEE call. In this case, extra STOPEE calls are issued and a warning message appears.
This assembler program would assist in setting up the Exit Descriptor (ninth parameter) for the STARTSS call in your COBOL client programs. It takes two input parameters. As part of the setup, a copy of the COBOL’s original first-level save area (the CICS DFHEISTG Control Block) is made, and its address is placed in the HRNXDUSR field of the data area named HRNXD further down in the code.
COBOL programmers do not need to be concerned with individual data elements within the two following data areas, but they must provide adequate storage as noted by the following example. Modify this example program according to the TP monitor conventions for your TP environment.