Author Topic: BREAK=YES creates multiple documents but no split happens  (Read 3516 times)

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
BREAK=YES creates multiple documents but no split happens
« on: May 07, 2019, 06:27:39 AM »
Hi fellow ODUsers,
I have been facing a typical problem with document breaking. I had an existing report layout (for EBCDIC reports) being indexed using ACIF. Per the new revisions mandated by the customer,
1. The positions of some of the fields changed a little
2. For some other fields, the width changed a little
3. Two fields got added.

So, I made these minor changes to the Indexer code, no biggie. Now to the weird part - earlier the same (well, almost) indexing scheme used to split a multi-page document to multiple single-page documents based on the change in field values E.g. a 3-page document would be split into 3 separate documents of 1 page each and each of the documents would have the correct index values saved against it in the database. If the OutletID field is populated as 0133, 0149, 0157 on three different pages, it appeared likewise in the indexes. But now:

1. Three rows get created but no split actually happens. All the three documents contain all the three pages
2. The index values populated for the first document are correct (picked from the first page) but these values are also duplicated for the second and third documents. i.e. OutletID 0133 is getting populated for the other documents too. Likewise for other fields. Only the ProbationDate field changes now (it is based on a floating trigger)

Code: [Select]
CC=YES
CCTYPE=A
CONVERT=NO
CPGID=500
MCF2REF=CPCS
TRC=NO
FILEFORMAT=RECORD,133
TRIGGER1=*,1,X'F1',(TYPE=GROUP)                                                                           /* 1                */
TRIGGER2=2,61,X'C3E3D940C6C9D3C540D9C5D7D6D9E3',(TYPE=GROUP)                   /* CTR FILE REPORT  */
TRIGGER3=*,37,X'E5C9D6D3C1E3C9D6D540C4C1E3C5407A',(TYPE=FLOAT)                 /* PROBATION DATE : */
FIELD1=1,3,10,(TRIGGER=1,BASE=0)
FIELD2=4,17,3,(TRIGGER=1,BASE=0)
FIELD3=6,17,10,(TRIGGER=1,BASE=0)
FIELD4=4,54,8,(TRIGGER=1,BASE=0)
FIELD5=4,90,8,(TRIGGER=1,BASE=0)
FIELD6=7,17,100,(TRIGGER=1,BASE=0)
FIELD7=0,54,8,(TRIGGER=3,BASE=0,MASK='########',DEFAULT=X'F0F1F0F1F1F9F7F0')   /* 01011970         */
FIELD8=8,23,5,(TRIGGER=1,BASE=0)
FIELD9=5,17,9,(TRIGGER=1,BASE=0)
INDEX1=X'C49683A4948595A3C481A385',FIELD1,(TYPE=GROUP,BREAK=YES)                  /* DocumentDate     */
INDEX2=X'D98583969984E3A89785',FIELD2,(TYPE=GROUP,BREAK=YES)                          /* RecordCategory      */
INDEX3=X'E28598A485958385D5A494828599',FIELD3,(TYPE=GROUP,BREAK=YES)           /* SerialNumber   */
INDEX4=X'C396A58599818785C2',FIELD4,(TYPE=GROUP,BREAK=YES)                            /* CheckStartDate        */
INDEX5=X'C396A58599818785C5',FIELD5,(TYPE=GROUP,BREAK=YES)                            /* CheckEndDate    */
INDEX6=X'E2A482918583A3D5819485',FIELD6,(TYPE=GROUP,BREAK=YES)                    /* SubjectName      */
INDEX7=X'E589969381A3899695C481A385',FIELD7,(TYPE=GROUP,BREAK=NO)              /* ProbationDate     */
INDEX8=X'E2A3969985C9C4',FIELD8,(TYPE=GROUP,BREAK=YES)                                  /* OutletID  -position changed          */
INDEX9=X'C2A4A2E49589A3',FIELD9,(TYPE=GROUP,BREAK=YES)                                 /* BusinessUnit  - new field         */
DCFPAGENAMES=NO
UNIQUEBNGS=YES
IMAGEOUT=ASIS
INDEXOBJ=GROUP
INDEXSTARTBY=1
INSERTIMM=NO
RESTYPE=NONE

How the indexes appeared earlier:
DocumentDate   OutletID    RecordCat  CheckStartDate  CheckEndDate     SlNo      Subject                ProbationDate
2016-03-02       0133       2B           2016-02-20      2016-02-26      00001   ILVEA GOMEZ ZALAYA        2016-02-26                   
2016-03-02       0149       3A           2016-03-20      2016-03-26      00002   ILVEA GOMEZ ZALAYA        2016-03-26                   
2016-03-02       0157       4A           2016-04-20      2016-04-26      00003   ILVEA GOMEZ ZALAYA        2016-04-26


How are they appearing now:
DocumentDate   OutletID    RecordCat  CheckStartDate  CheckEndDate     SlNo      Subject                ProbationDate
2016-03-02       0133       2B           2016-02-20      2016-02-26      00001   ILVEA GOMEZ ZALAYA        2016-02-26                   
2016-03-02       0133       2B           2016-02-20      2016-02-26      00001   ILVEA GOMEZ ZALAYA        2016-03-26                   
2016-03-02       0133       2B           2016-02-20      2016-02-26      00001   ILVEA GOMEZ ZALAYA        2016-04-26   

What could I be missing? Any help will be really appreciated.

Regards,
AP
« Last Edit: May 07, 2019, 06:35:54 AM by mroutlander »

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #1 on: May 08, 2019, 11:02:51 AM »
For a quick check, make sure you're getting a top of form (X'F1') at the top of every page.  Your symptoms are similar to that issue.

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #2 on: May 09, 2019, 03:56:35 AM »
Thanks Greg, for your inputs. I checked and found X'F1' to be present on top of all the pages (and got disappointed  :'( as I was hoping this answer would help me resolve my problem). 

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #3 on: May 09, 2019, 04:59:36 AM »
Ahh too bad was hoping for an easy fix.
Another question.  I see you have a trigger 2 defined but nothing using it.  Is it possible one, or more, of the fields got erroneously changed back to use trigger 1?

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #4 on: May 09, 2019, 05:17:50 AM »
Quote
I see you have a trigger 2 defined but nothing using it.  Is it possible one, or more, of the fields got erroneously changed back to use trigger 1?
Thanks again for the quick response.
Unfortunately, even that is not the case. TRIGGER2 was defined way back but didn't really turn out helpful and left as is. So, as of today it is a redundant trigger.

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #5 on: May 09, 2019, 10:50:43 AM »
Ok.  One last try.  Could the new forms have a different LRECL than the original?  I've seen your issue when that occurs as the text starts wrapping.

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #6 on: May 10, 2019, 06:10:01 AM »
Thanks Greg! LRECL is unchanged at 133.

It is worth noting that when I tried to index an old 16-page file (with an old layout), I just changed the index positions according to the said layout and was able to get 16 different files of one page each (and with correct indexes). So, my application should be in the right shape, I assume?

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #7 on: May 10, 2019, 12:02:47 PM »
Yes.  By all indications your application seems ok.  To me it seems something with the way the new reports are being generated is off.  There's no paging occurring and indexes past the initial ones are not being found, other than the one based on the floating trigger.  In short it's not finding Trigger 1 after the first occurrence of X'F1'

mroutlander

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: BREAK=YES creates multiple documents but no split happens
« Reply #8 on: May 13, 2019, 06:25:10 AM »
Thanks Greg. That seemed like the case. I have requested for some additional test files to see how the application behaves. Will share the outcome here. Thanks again, for your pointers  :)