Negative values in IDMS reports written in CULPRIT
search cancel

Negative values in IDMS reports written in CULPRIT

book

Article ID: 280402

calendar_today

Updated On:

Products

IDMS

Issue/Introduction

It is possible for a value in an IDMS report written in CULPRIT to (unexpectedly) appear as a negative number.

Environment

Release: All supported releases.

Cause

Almost all of the system supplied IDMS reports are written in CULPRIT.

By default, CULPRIT interprets a binary field that is an even number of bytes long as being signed. So, if the number is internally so unexpectedly large that the high-order bit is on, it becomes a negative number when interpreted as being signed. For example, in the case of four byte numeric values, x'FFFFFFFF' is -1, x'FFFFFFFE' is -2, x'FFFFFFFD' is -3 and so on.

Resolution

For example, if a field in such a report is displayed as having the value -834,873,330, then internally it is x'CE3CD80E', so the value interpreted as an unsigned number is 3,460,093,966.