Executing a CICS transaction
Before you execute a CICS ECI transaction, you must do the following:
1. Connect an event (such as a Push Button clicked event) to the executeProgram action of the CICS Program part.
2. Connect the self attribute of the CICS Logical Unit of Work part to the logicalUnitOfWork attribute of the connection you just made.
3. Now, create a common area to be used by the CICS transaction. The common area will be passed to the CICS Program part as a parameter to the event-to-action connection that causes the CICS transaction to be executed. We'll add the common area as a Record within the CICS Proc Dialog part. The following steps describe how:
a. Select the CICS Proc Dialog part from the parts palette and drop it onto the free-form surface.
b. Open the setting for the Proc Dialog and change to the Records page of the settings notebook.
c. Select the appropriate Function language and type in the name of a cooresponding language header file in the File name text field. This is the C or COBOL language header file that contains the record format you want to use.
d. Select the Parse button and if you've provided a valid record structure format you will see the record structure name appear in the Available list.
e. Now, select the name of the record structure from the Available list and select the OK push button to save the settings. The record structure that you parsed will now be available as a tear--off attribute of the CICS Proc Dialog
f. From the CICS Proc Dialog part pop-up menu, select Tear-Off Attribute then select the record part from the list. It should be marked with (Compound Type).
g. Now, add the tear-off attribute to the free-form surface.
4. Next, connect the self attribute from the common area you just added to the commonArea attribute of the event-to-action connection made in step one above.
Beginning the Logical Unit of Work (LUW)
For proper implementation of a CICS Logical Unit of Work (LUW), a minimum of three LUW states must be controlled. You must signal the beginning of the LUW, rollback the LUW if an error occurs and of course commit the LUW in the absence of errors.
First, let discuss beginning the LUW. Since a LUW defines the scope of a CICS transaction that contains one or more executeProgram calls we need to signal the beginning of the LUW prior to the first executeProgram call contained within the LUW. To do that you must trigger the Begin action of the CICS LUW part. You can do this simply by making an event-to-action connection to the Begin action of the CICS LUW part.
To ensure that the LUW is properly rolled back upon error detection, you must ensure that the Rollback action is triggered if an error is detecetd. You can do this simply by making an event-to-action connection to the Rollback action of the CICS LUW part.
Finally, following the completion of the LUW and in the absence of errors you need to commit the LUW. You can do this simply by making an event-to-action connection to the Commit action of the CICS LUW part.
Last modified date: 01/29/2015