This generic exit is for mapping fields to nullable DB2® columns. Optional user parameters specified in the mapping define the VSAM field values that are to become nulls in DB2. The default version of the exit handles the conversion of repeating bytes of binary zeros, binary ones, and spaces into nulls, and conversion to any of these values on retrieval from DB2.
Much of the function of this exit is superseded by the built-in support for nullable columns.
The exit must be mapped as follows:
EXITA=NULLCOLS,input,output
The parameter input defines the VSAM field value that is to become null in DB2. The parameter output defines the field value to be built by CICS® VT and returned to VSAM. The value you specify must be repeated in each byte for the entire field. Otherwise it is not treated as null.
EXITA=NULLCOLS,S
An input field value of spaces becomes a null value in
DB2. On retrieval from
DB2, the field will be spaces.
EXITA=NULLCOLS,LS
An input field value of binary zeros or spaces become null in
DB2. On retrieval, the field value becomes binary zeros.
EXITA=NULLCOLS
If no parameters are specified, the default is L. Binary zeros become
null in DB2, and the retrieved
field value is binary zeros.
EXITA=NULLCOLS,,S
No input parameter is supplied, so the default is L. Field values of
binary zeros become nulls in DB2.
On retrieval, the field value becomes spaces.
You can define up to five custom values to be handled as null bytes. This involves modifying the exit source and assembling a new load module. There are potentially 10 lines of assembler code near the start of the program to be modified.
SETNULL1 DC X'6F' /* INPUT PARAMETER VALUE 1
SETNULL2 DC X'4B' /* INPUT PARAMETER VALUE 2
SETNULL3 DC X'60' /* INPUT PARAMETER VALUE 3
SETNULL4 DC X'00' /* INPUT PARAMETER VALUE 4
SETNULL5 DC X'00' /* INPUT PARAMETER VALUE 5
FILLVAL1 DC X'4B' /* OUTPUT PARAMETER VALUE 1
FILLVAL2 DC X'FF' /* OUTPUT PARAMETER VALUE 2
FILLVAL3 DC X'00' /* OUTPUT PARAMETER VALUE 3
FILLVAL4 DC X'00' /* OUTPUT PARAMETER VALUE 4
FILLVAL5 DC X'00' /* OUTPUT PARAMETER VALUE 5
The SETNULLx fields define input parameters and the FILLVALn fields define output parameters. Custom value parameters can be combined with supplied parameter values.
EXITA=NULLCOLS,1SH
Input field values of X'6F', spaces, or binary ones become null values. No
output parameter is specified, so the first input parameter value
is used, resulting in field values x'6F' returned from
DB2.
EXITA=NULLCOLS,1,2