Previous Topic Next topic Print topic


Database Load Conversion Issues

Pay particular attention to DBD statements that specify hexadecimal values as they can cause trouble when loading an IMS database using the Load function.

Issue

Some statements contain conditions that are dependent upon a hexadecimal value, but that hexadecimal value is converted from EBCDIC to ASCII when loading the database.

In this example, a NULLVAL parameter on an XDFLD statement defines a secondary index using a hexadecimal value, and suppresses the creation of the secondary index when the value of the index key contains the hexadecimal value. For example:

XDFLD NAME=STREX013, SEGMENT=, NULLVAL=X'40',

When loading the database and converting the data from EBCDIC to ASCII, fields containing x'40' are converted to x'20'. Subsequently, the Load function could attempt to insert multiple segments with a key value of x'20', resulting in duplicate key values and causing the insert to fail. However, the intent of the statement is to suppress creation of index segments.

Resolution

To resolve this problem, change the hexadecimal value to its converted ASCII equivalent. For example:

XDFLD NAME=STREX013, SEGMENT=, NULLVAL=X'20',

Then, compile the DBD source and load the database using the Load function.

Previous Topic Next topic Print topic