Data reengineering

Data reengineering is occurring for the two fields that are mapped to the columns that are highlighted in the DDL in Figure 1, as follows:

  • The field called VIDF005 is 3 bytes starting at position 33 in the VSAM record. The field type is C, which means the data in the VSAM file is displayable alphanumeric. In the copybook, this field is defined as zoned decimal, and maps to the column ITEM_REORDER_NO. This column is defined in the VID_ITEM table as SMALLINT, which is a numeric data type in DB2®. CICS® VT automatically translates the zoned decimal field values into the appropriate SMALLINT data value on WRITE/REWRITE calls. For a GET/BROWSE call, CICS VT performs the data translation in reverse.
  • The field called VIDF007 is 5 bytes starting at position 39 and has a field type of P. This means the data in this field in the VSAM file is packed decimal. It maps to the DB2 column ITEM_DATE_FSHIP that is defined as DATE in DB2. CICS VT automatically converts the packed-decimal field value to the appropriate date value according to the definition of the picture string. This is CCYYMMDD, as shown in Figure 1, and is provided by the user.

In both these cases, data is automatically reengineered by CICS VT as a result of the combination of the VSAM field type and the DB2 column type in the mapping.

The DB2 column data type is not specified anywhere in the mapping process. CICS VT gets this information from the DB2 catalog tables during the driver generation process.