Switching transaction IDs in order to switch plans

Once a transaction has started, you cannot control the plan used by the transaction ID, but you can control the transaction ID itself. Therefore you can switch plans by switching transaction IDs. However, you are not recommended to do this.

About this task

Instead of switching transaction IDs to switch plans, you are recommended to bind the DBRM from the missing program into a package, and add the package to a package list in the existing plan.

If you have to switch transaction IDs, note that in most cases, the first program transfers data to the next program. The preferred method of doing this is to use an EXEC CICS RETURN IMMEDIATE command. Alternatively, you can start a new CICS task against the same terminal, using an EXEC CICS START command, or using a transient data queue with a trigger level of one. The old program should issue RETURN to CICS to make the new task start. For both of these switching techniques, the work done in one user transaction is split up into more than one UOW. If the new task is backed out, the work done in the first task remains committed.

If you switch transaction IDs in order to switch plans, the application programs contain the logic to decide when to switch transaction ID. This means that if you want to change the plan structure (for example for performance and operational reasons), you need to change the application programs as well.

A different technique is to have the program flow controlled by a table, instead of having code to do this in several programs. The main idea is that it is simpler to maintain the relationship between the plans, programs, and transaction IDs in a table than to maintain code in each application program to do the logic. Developing the application programs is also simpler if a standard interface is provided.



dfhtk6r.html | Timestamp icon Last updated: Monday, 5 June 2017