JREPORTs SELECT not working for large values
search cancel

JREPORTs SELECT not working for large values

book

Article ID: 56608

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

When issuing a SELECT in JREPORTs for a specific sequence number, transaction-id, or dbkey, if the value is greater than 2,147,483,647, the requested record(s) is/are not found.

Environment

Release: IDMS, all supported releases

Resolution

When the value for journal sequence number, transaction id, or dbkey exceeds 2,147,483,647 (2**31-1 or x'7FFFFFFF') the selection criteria comparison value must be specified as a hexadecimal literal for the evaluation to be performed properly.

The following fields have been added to JREPORT-000 for these comparisons:

SEQ-A
TRANSACT-IDC
DBKEY-A

This example prints JREPORT 008 (Formatted Record Dump).
The report includes only the BFOR and AFTR records for run unit 2,147,483,649.
Since this value is larger than x'7FFFFFFF' the compare needs to be done using a hexadecimal literal against field TRANSACT-IDC.

 INPUT 19068 19068 UM(CULLJRNL)
JREPORT=008
 SEL WHEN TYPE EQ ('BFOR' 'AFTR')
* AND TRANSACT-IDC EQ X'80000001'

Note that the journal sequence number is an eight-byte field and as such the hexadecimal literals must be specified with 16 hexadecimal digits, so if the search is for a specific journal sequence number (SEQ-A), for example 1,000,000,000,000, which is x'E8D4A51000', it must be coded with leading zeroes:

* AND SEQ-A EQ X'000000E8D4A51000'