Control flow in request processing

To make decisions about the facilities you will use, and how you will customize them, you need to understand how the components of the CICS® business logic interface interact. This topic describes the control flow that is involved in processing a LINK call for a program and the control flow involved in processing a request for a terminal-oriented transaction.

Using the CICS business logic interface to call a program

Figure 1 shows the control flow through the CICS business logic interface to a program. The CICS business logic interface is accessed by a LINK command to PROGRAM DFHWBBLI.

Figure 1. Calling a program with the CICS business logic interface—control flow
Calling a program with the CICS business logic interface control flow
  1. A request arrives for the CICS business logic interface.
  2. If the caller requests a converter, the CICS business logic interface calls it, requesting the Decode function. Decode sets up the COMMAREA for the CICS application program.
  3. The CICS business logic interface calls the CICS application program that the caller specified. The COMMAREA passed to the application program is the one set up by Decode. If the caller of the CICS business logic interface indicates that a converter is not required, the first 32K bytes of the request is passed to the CICS application program in its COMMAREA.
  4. The CICS application program processes the request, and returns output in the COMMAREA.
  5. If the caller requested a converter, the CICS business logic interface calls the Encode function of the converter, which uses the COMMAREA to prepare the response. If no converter program was called, the CICS business logic interface assumes that the CICS application program has put the intended response in the COMMAREA.
  6. The CICS business logic interface sends a reply back to the caller.

Using the CICS business logic interface to run a terminal-oriented transaction

Figure 2 shows the control flow through the CICS business logic interface for a request for a terminal-oriented transaction. Note that the business logic interface is running under a CICS mirror transaction, not a web CICS transaction. The first part of the processing is the same as for calling a program, but if you want to run a transaction, you must specify DFHWBTTA as the CICS application program to be called, in wbbl_server_program_name.

Figure 2. Running a transaction with the CICS business logic interface—control flow
Running a transaction with the CICS business logic interface control flow
  1. If the caller requests a converter, the CICS business logic interface calls it, requesting the Decode function. Decode sets up the COMMAREA for DFHWBTTA.
  2. The CICS business logic interface calls DFHWBTTA. The COMMAREA passed to DFHWBTTA is the one set up by Decode. If no converter program was called, the COMMAREA contains the entire request.
  3. DFHWBTTA extracts the transaction ID for the terminal-oriented transaction from the HTTP request, and starts a transaction that runs the CICS web bridge exit.
  4. When the program attempts to write to its principal facility, the data is intercepted by the CICS web bridge exit. The exit constructs the HTML response which is returned to the CICS business logic interface. If the caller requested a converter, the CICS business logic interface calls the Encode function of the converter, which uses the COMMAREA to prepare the response. If no converter program was called, the CICS business logic interface assumes that the COMMAREA contains the intended response.