Author Topic: Indexing issue  (Read 1794 times)

DDP021

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Indexing issue
« on: March 19, 2019, 05:48:15 AM »
Hi...We have a report where were are doing a record range on the trigger (TYPE=GROUP,RECORDRANGE=(1,8)).  We had to do this because on certain index pages the actual trigger can fall between lines 1-8.  The issue we found is, if the previous page before an index page has less than 6 lines it will attach itself to the following index.  As an example, if there were 2 index pages, the first had a total of 10 pages.  If Page 10 only had 5 lines on it (including carriage control) it will attach it to next index.  So when you open the first index it will have pages 1-9.  When you open the second index, it will start with page 10 and then second page will be page 1 (index page containing the trigger) of the second index on the input file.  Strange thing is if we edit the file and add just one more line (so it has 6 lines on that page) it will group the pages correctly.  First index will have the 10 pages and second index will start with the index page (Page 1)...We BELIEVE it has something to do with the Record Range but with it being set to 1,8 can't understand why when its just 5 lines it doesn't work but 6 lines it will....Any ideas? Below is a sample showing the all the Triggers.  We had to create a separate trigger to capture the Date page for use as the Posting date. It only appears once at the beginning of each file.

CC=YES
CCTYPE=Z
CONVERT=NO
CPGID=1252
MCF2REF=CPCS
TRC=NO
FILEFORMAT=STREAM,(NEWLINE=X'0A')
TRIGGER1=*,1,X'31',(TYPE=GROUP)                                            /* 1                */
TRIGGER2=*,2,X'4143434F554E543A',(TYPE=GROUP,RECORDRANGE=(1,8))     /* ACCOUNT:     */
TRIGGER3=*,15,X'666F7220446174653A',(TYPE=FLOAT)                           /* for Date:        */