Endevor ACMQ AUTO REORG
search cancel

Endevor ACMQ AUTO REORG

book

Article ID: 21398

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

How does the ACMQ Auto Reorg work? 

Environment

All Releases

Endevor 

Resolution

HOW ACM DATA IS ORGANIZED:

  1. ACM feature uses two files - ROOT and XREF.

  2. ROOT holds element entries. The root entry includes element location, so if there are two elements with the same name but in different locations, there will be two ROOT entries.

  3. XREF holds element relations, or more precisely, relations between root entries. When a ROOT entry-1 (let's say a program) references a ROOT entry-2 (a copybook), an XREF entry gets created. Location of the elements again matters.

  4. ROOT entry is created only when there is some XREF entry to be created as well, i.e. when the corresponding element has references or is referenced. Creating an element without components does not create a ROOT entry (nor XREF entry of course).

  Example: If you add A copybooks and B programs, each of the programs using all of the copybooks, you will get:

  • A+B root records
  • A*B xref records

HOW REORG WORKS:

  1. ACM files have a sorted area for fast searching. However, new entries are inserted to the end of the file (true for both ROOT and XREF) which is unsorted.

  2. When the unsorted area in either ROOT or XREF file reaches or exceeds certain number of entries (threshold settable thru AUTO_ACMQ_FILE_REORG in the ENCOPTBL), the REORG is triggered.

  3. When the reorg is triggered, both ROOT and XREF files are reorganized, no matter which of those two files hit the trigger. Also, the following WTO messages appear in the job log:

    ACMQ500I AUTO ACMQ FILE REORG STARTED.
    ACMQ500I AUTO ACMQ FILE REORG ENDED.

  4. Reorg will sort all unsorted records and merge them into the sorted area. After the reorg, the number of unsorted records will be zero.

  5. Auto reorg only occurs when using Batch Processing.

  6. f ACMQ_REORG_BY_WTO is turned on in ENCOPTBL, the same rules apply, but instead of doing a REORG, a WTO message is issued.