CICS VSAM Transparency for z/OS, Version 1.2


PACKDEC

When a copybook field is mapped to a decimal or date DB2® column, invalid field values from your existing application programs will result in an error, such as an S0C7 abend or -310 SQL code. In most cases, invalid data is identified during initial data migration, either during the VIDLOAD utility or during the DB2 load process.

When a date or decimal column maps to a field or subfield which is the base cluster or alternate index key, a data error may occur in calls such as START, STARTBR, or POINT. For example, assume you have a group key field and the subfields are a combination of zoned and packed decimal. If the key field is initialized in a single COBOL MOVE statement, either the zoned or packed decimal field will contain in invalid value. This is not an issue in VSAM but is an issue when the data is in DB2.

The PACKDEC exit is used for a packed decimal key or alternate index field that is mapped to a DEC column with the same length. If the exit is being called for a direct read it tests the value of the first byte. If the first byte value is X'F0', the exit overlays the entire field with packed decimal zero. Without the exit, an S0C7 abend occurs.



Concept topic


Last updated: May 25, 2012 20:46:1