Mapping fields to columns

You specify the field name, its starting position, and the length and data type of each field that is mapped to a DB2® column.

The file VIDKSDS in Figure 1 is mapped to the table shown in Figure 1.
Figure 1. SQL DDL for VIDKSDS
CREATE TABLE creator.VID_ITEM
  							(ITEM_NUMBER        CHARACTER(6)    NOT NULL,
   							 ITEM_NAME          CHARACTER(12)   NOT NULL,
   							 ITEM_COLOUR        CHARACTER(6)    NOT NULL,
   							 ITEM_WEIGHT        CHARACTER(4)    NOT NULL,
   							 ITEM_COST          DECIMAL(7,2)    NOT NULL,
   							 ITEM_REORDER_NO    SMALLINT        NOT NULL,
   							 ITEM_SUPP_CODE     CHARACTER(3)    NOT NULL,
   							 ITEM_DATE_FSHIP    DATE            NOT NULL,
   							 ITEM_SHELF_LIFE    CHARACTER(2)    NOT NULL,
   							 ITEM_DESCRIPTION   CHARACTER(35)   NOT NULL,
   					        PRIMARY KEY (ITEM_NUMBER))
   							IN db.ts ;
   				

If you specify a combination of field type and DB2 column type that is not supported by CICS® VT, you receive an error during DIM generation.

Note that each column in Figure 1 has the NOT NULL attribute. You can use nullable columns with CICS VT using either additional mapping parameters or by using a user exit. Sample exits in COBOL and assembler are provided to handle nullable columns.


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/cvtdecmap.html