DB004097 when compiling a DMCL
search cancel

DB004097 when compiling a DMCL

book

Article ID: 18498

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

During a compile of a DMCL, it is possible that a DB004097 message will be issued.

 CONNECT TO SYSTEM;
 Status = 0        SQLSTATE = 00000
 GENERATE DMCL xxxxxxxx;
 Status = -4       SQLSTATE = 64000        Messages follow:
 DB004097 T61 C-4M6015: EMPDEMO.EMP-DEMO-REGION SYMBOL EMPNAME index displacement invalid.
 DB004099 T61 C-4M6015: ERRORS DETECTED DURING GENERATE - GENERATE DISALLOWED

Environment

Release: All supported releases.

Resolution

The DB004097 indicates that the number of pages in the DISPLACEMENT is greater than or equal to the number of pages in the area. This physical area is defined like this:

 CREATE
 PHYSICAL AREA EMPDEMO.EMP-DEMO-REGION
     PRIMARY SPACE 50 PAGES  FROM PAGE 75001
     MAXIMUM SPACE 100 PAGES
     PAGE SIZE 4276 CHARACTERS
     INCLUDE SYMBOLIC INDEX EMPNAME
         BLOCK CONTAINS 5 KEYS DISPLACEMENT 50 PAGES
     WITHIN FILE EMPDEMO
         FROM 1 FOR ALL BLOCKS
     ;

This situation was tolerated in earlier releases of IDMS and no error generated. If a displacement greater than the number of pages was specified, the displacement as used at run time simply "wrapped" around the end of the area and started from the beginning again. In particular, this meant that if a displacement was specified as equal to (or a multiple of) the number if pages, then it would have no effect at all.

The effect of this situation is most likely not what the user intended, so it was decided to issue an error when it was detected at DMCL compile time. Release 16.0 PTF QO88651 was written to implement this change and it was fixed in source in r17.0 and above. Therefore, it is possible that this condition already exists in a DMCL, and would not be recognized until the first time the DMCL was compiled after upgrading to r17.0 (if QO88651 was never applied in r16.0).

The solution in any case is to reduce the DISPLACEMENT to something less than the number of pages in the area.

This change does not require any action against the actual index. The displacement is only there to influence where individual index records (SR8s) are stored. The index can still be successfully navigated and updated regardless of what the displacement is.

However, for the new displacement value to be accurately reflected in the index, it will have to be rebuilt with the MAINTAIN INDEX utility.