CICS VSAM Transparency for z/OS, Version 1.2


Successful completion and the call is complete

In some cases, your exit needs to override CICS® VT.

An illustration of this is the exit sample CTLRECF exit, which is described in FBE for managing a control record . The mapping for this exit is shown in Figure 1 .

Figure 1. Signalling a call is complete
 ------------------- CICS VT: List of fields for ITEMFL      Row 1 to 10 of 10 
Command ===> ________________________________________________ Scroll ===> CSR  
                                                                               
VSAM file type : KSDS     Creator   : CICSVT                                 + 
Data set length: 00080    Table name: HLL_ITEM                               + 
                                                                               
Actions: S Display, U Update, I Insert, D Delete                               
                                                                               
A Field    Bytes Start Type DB2 column name                  Exit     Pic Par  
- -------- ----- ----- ---- ------------------------------   -------- --- ---  
_ F01      00006 00001   C  ITEM_NUMBER                    + CTLRECF           
_ F02      00012 00007   C  ITEM_NAME                      +                   
_ F03      00006 00019   C  ITEM_COLOUR                    +                   
_ F04      00004 00025   C  ITEM_WEIGHT                    +                   
_ F05      00004 00029   P  ITEM_COST                      + NUMVALF                  
_ F06      00003 00033   C  ITEM_REORDER_NO                +                   
_ F07      00003 00036   C  ITEM_SUPP_CODE                 +                   
_ F08      00005 00039   P  ITEM_DATE_FSHIP                +           Y       
_ F09      00002 00044   C  ITEM_SHELF_LIFE                +                   
_ F10      00035 00046   C  ITEM_DESCRIPTION               +                   
******************************* Bottom of data ********************************

The purpose of CTLRECF is to recognize that a call processes the control record, which exists in a separate DB2® table. The key of the control record is assumed to be the lowest key value in the file, in this case low values.

When CTLRECF processes a call for a regular record, it builds the appropriate field for the key, and then returns control to CICS VT to continue building the remainder of the record. In this case, EXRET is SPACE.

Now assume that there is a call to retrieve the control record. CTLRECF recognizes the key is low values, retrieves the row from the control table and builds the record area to be returned to the application. If CTLRECF ends and EXRET is SPACE, CICS VT assumes that the remaining fields in the file are to be built. This would overwrite the record area built by CTLRECF.

To prevent this, your exit must set EXRET = Y. This signals to CICS VT that the record area is fully built. CICS VT will not build the remaining fields.

When your exit sets EXRET = Y, any value in EXSQLCA is ignored.



Concept topic


Last updated: November 9, 2012 20:43:53