NULLCOL

This exit translates predefined hexadecimal strings into nulls in DB2®, and translates a null back to the specified hexadecimal value on retrieval from DB2.

For example, your program could insert either high values or low values in a packed decimal field to represent that a valid field value is not known. In a DB2 application, nulls are often used to represent column values that are not known at insert time.

The field value must be coded as a constant in line 23 in the sample exit source as follows:
NULLVAL  DC    X'FFFFFFF'         NULL VALUE
No other changes to the sample NULLCOL exit are required.

The NULLCOL exit should be copied to a new source member with an 8-byte name and the appropriate nulls value specified at the NULLVAL label. The new exit must be assembled and link-edited, and mapped, The mapping is shown in Figure 1:

Figure 1. Specifying an FBE exit
----------------------------- CICS VT: Update field ----------------------------
 Command ===> ________________________________________________ Scroll ===> CSR_ 
                                                                                
 Data set name  : ORDERFL                                                       
 Creator        : PROD                                                         +
 Table          : ORDER_TAB                                                   +
 Data set length: 00352                                                         
                                                                                
 Field name . . . . . . : VIDF0019                                                
 Field length . . .  ===> 00004              (In bytes)                         
 Field type . . . .  ===> P                  ("C", "P", "U", "X", "F", "H")     
 Column name  . . .  ===> CREATE_DATE................... + (Look-up available)  
 Starting position   ===> 00259              ("1" = Beginning of data set)      
 Picture or FBE . .  ===> EXITL=NULLSMP1____________  (example  HH.XX.SS.NNNNNN)
                                                            (or MMDDYY)         
                                                            (or EXITx=exit name)
 Parameters . . . .  ===> __________________________  Optional user parameters  
 Special function .  ===> ___                ("KEY", "PTH", "BKY", or blank)    
 Mapped from table   ===> P                  ("P"=Prim, "X"=Not mapped)         
 Build order  . . .  ===> 00019              ("1"=first, "2"=second and so on)  
                                                                                
                                                                                
 Press: Enter=Update  PF3=Exit  PF1=Help                                        

Note that the exit compares the value of the entire VSAM field to the hard-coded nulls value.


Concept Concept

Feedback


Timestamp icon Last updated: Monday, 10 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.vt.doc//topics/NULLCOL.html