Unlike VSAM, DB2® enforces data value rules according to the data type of the column.
Copybook field | Picture |
---|---|
ITEM-COST | S99999V99 COMP-3 |
ITEM-REORDER-QUANTITY | S999 |
ITEM-FIRST-SHIP-DATE | S(9) COMP-3 |
DB2 column | Data type |
---|---|
ITEM_COST | DEC(7,2) |
ITEM_REORDER_NO | SMALLINT |
ITEM_DATE_FSHIP | DATE |
The format of the VIDFBEP control block is explained in the CICS VT for z/OS Data Reengineering and Customization Guide. Invalid data for the ITEM-FIRST-SHIP-DATE field does not result in an S0C7 abend, but causes an error in the DB2 LOAD utility. For example, a value of x'000999999C' or spaces cannot be converted into valid DB2 DATE column values, and will produce the following error:
DSNU334I -DB2B DSNURWBG - INPUT FIELD 'col-name' INVALID
FOR 'table-name', ERROR CODE '14'
DISCARDS 0
You also need to add a //SYSDISC DD statement to the DB2 LOAD step JCL.
You can review the SYSDISC data set after migration, correct the offending column values and run the LOAD specifying the SYSDISC data set as input and changing REPLACE to RESUME YES in the load control cards.