Sort issue -Multiple Easytrieve reports writing to same file



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Sort issue -Multiple Easytrieve reports writing to same file

Postby tania » Thu Feb 19, 2009 11:51 pm

Hi,

My easytrieve prog is writing 3 reports to the same file depending on a certain logic. The problem is that in the output file it does not write the report records as the inpput file, instead it clubs the records of a report type together. For eg

Input file
Rec 1: legal entity = All, Product = A (to be processed by report A)
Rec 2: legal entity = All, Product = A (to be processed by report A)
Rec 3: legal entity = All, Product = B (to be processed by report B)
Rec 4: legal entity = B, Product = A (to be processed by report A)
Rec 5: legal entity = B, Product = B (to be processed by report B)
Rec 6: legal entity = E, Product = A (to be processed by report A)
Rec 7: legal entity = E, Product = A (to be processed by report A)
Rec 8: legal entity = E, Product = C (to be processed by report C)

IN the O/p file,
All the records with legal entity All should appear together, instead they come as
Rec 1: legal entity = All, Product = A (to be processed by report A)
Rec 2: legal entity = All, Product = A (to be processed by report A)
Rec 4: legal entity = B, Product = A (to be processed by report A)
Rec 6: legal entity = E, Product = A (to be processed by report A)
Rec 7: legal entity = E, Product = A (to be processed by report A)
Rec 3: legal entity = All, Product = B (to be processed by report B)
Rec 5: legal entity = B, Product = B (to be processed by report B)
Rec 8: legal entity = E, Product = C (to be processed by report C)

How can I make it display the records in the order they were processed(the order they were present in the i/p file) or basically sorted by legal entity.
tania
 
Posts: 5
Joined: Thu Feb 12, 2009 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort issue -Multiple Easytrieve reports writing to same file

Postby dick scherrer » Fri Feb 20, 2009 12:48 am

Hello,

I believe you will discover that the behavior is a feature rather than a problem. . .

Most often, when multiple reports are produced, they have their own headers and total breaks etc. To have these interleaved with some other report(s) would be confusing at best. . .

You may need to do this within a single report or change the code to write the output you want rather than trying to use a report definition.

If you post the report definitions, someone may have a suggestion.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sort issue -Multiple Easytrieve reports writing to same file

Postby tania » Fri Feb 20, 2009 2:35 am

The headers of all my 3 reports are same. The difference is in the content..

REPORT ERRSUM1 PRINTER OUTFILE NOADJUST NOHEADING NODATE NOPAGE -
PAGESIZE 55 LINESIZE 132
SEQUENCE EXP-LEGAL-ENTITY
CONTROL FINAL NOPRINT EXP-LEGAL-ENTITY NOPRINT EXP-PRODUCT NOPRINT -
NEWPAGE
TITLE 1 COL 47 'ABC I N C.' COL 76 'RPT NO 1234'
TITLE 2 COL 47 'ABC REPORTING'
TITLE 5 COL 01 'Legal Entity: ' -
COL 17 EXP-LEGAL-ENTITY -
COL 72 'Cycle Begin Date : ' -
COL 91 WS-CYCLE-DATE-S
TITLE 6 COL 01 'Product: '-
COL 12 EXP-PRODUCT -
COL 72 'Cycle End Date : ' -
COL 91 WS-CYCLE-DATE-E
TITLE 7 COL 01 ' '
TITLE 8 COL 63 'Paid Amount'
LINE 01 COL 01 EXP-DOC-KEY -
COL 52 EXP-MAIL-ORDER-AMT

*
BEFORE-BREAK. PROC
IF LEVEL = 1
WS-DIFF-DISP = 'Adjusted Invoice Cycle Total'
DISPLAY COL 01 WS-DIFF-DISP +
COL 55 WS-DIFF-P
END-IF
END-PROC
*
REPORT RPTSEC2 PRINTER OUTFILE NOADJUST NOHEADING NODATE NOPAGE -
PAGESIZE 55 LINESIZE 132 SUMCTL TAG
SEQUENCE EXP-LEGAL-ENTITY
CONTROL FINAL NOPRINT EXP-LEGAL-ENTITY NOPRINT EXP-PRODUCT NOPRINT -
AMOUNT NEWPAGE
TITLE 1 COL 47 'ABC I N C.' COL 76 'RPT NO 1234'
TITLE 2 COL 47 'ABC REPORTING'
TITLE 5 COL 01 'Legal Entity: ' -
COL 17 EXP-LEGAL-ENTITY -
COL 72 'Cycle Begin Date : '
TITLE 6 COL 01 'Product: '-
COL 12 EXP-PRODUCT -
COL 72 'Cycle End Date : '
TITLE 7 COL 01 ' '
TITLE 8 COL 63 'Paid Amount'
TITLE 9 COL 01 EXP-HEADING-A
LINE 01 COL 01 EXP-DOC-KEY -
COL 17 EXP-CLM-TYPE -
COL 22 EXP-PROCESS-DT -
COL 36 EXP-PYMT-CAT-CD -
COL 52 EXP-MAIL-ORDER-AMT
*
BEFORE-BREAK. PROC
IF LEVEL = 1
DISPLAY COL 53 '_____________________'
END-IF
END-PROC

REPORT RPTSEC3 PRINTER OUTFILE NOADJUST NOHEADING NODATE NOPAGE -
PAGESIZE 55 LINESIZE 132 SUMCTL TAG
SEQUENCE EXP-LEGAL-ENTITY
CONTROL FINAL NOPRINT EXP-LEGAL-ENTITY NOPRINT EXP-PRODUCT NOPRINT -
AMOUNT NEWPAGE
TITLE 1 COL 47 'ABC I N C.' COL 76 'RPT NO 1234'
TITLE 2 COL 47 'ABC REPORTING'
TITLE 5 COL 01 'Legal Entity: ' -
COL 17 EXP-LEGAL-ENTITY -
COL 72 'Cycle Begin Date : '
TITLE 6 COL 01 'Product: '-
COL 12 EXP-PRODUCT -
COL 72 'Cycle End Date : '
TITLE 7 COL 01 ' '
TITLE 9 COL 01 'Claims on both cycle file and the daily file' -
COL 53 'Amount per daily file' -
COL 80 'Amount per cycle file' -
COL 118 'Difference'
TITLE 10 COL 01 'with different paid amounts'
LINE 01 COL 01 EXP-DOC-KEY -
COL 17 EXP-CLM-TYPE -
COL 22 EXP-PROCESS-DT -
COL 36 EXP-PYMT-CAT-CD -
COL 52 EXP-MAIL-ORDER-AMT -
COL 84 EXP-AMT-PER-CYC -
COL 111 EXP-AMT-DIFF
*
BEFORE-BREAK. PROC
IF LEVEL = 1
DISPLAY COL 53 '_____________________' -
COL 80 '_____________________' -
COL 107 '_____________________'
END-IF
END-PROC
tania
 
Posts: 5
Joined: Thu Feb 12, 2009 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort issue -Multiple Easytrieve reports writing to same file

Postby dick scherrer » Fri Feb 20, 2009 2:55 am

Hello,

Please post a bit of the output from each report - preferable once as it is created now and once as you would prefer it be created.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Sort issue -Multiple Easytrieve reports writing to same file

Postby tania » Fri Feb 20, 2009 10:44 pm

Ok, I decided to do the required in the same report, instead of writing multiple reports. But is it possible NOT to display the control totals certain times. Depending on a condition, I want to display the control totals.

REPORT RPTSEC2 PRINTER OUTFILE NOADJUST NOHEADING NODATE NOPAGE -
PAGESIZE 55 LINESIZE 132 SUMCTL TAG
CONTROL FINAL NOPRINT EXP-LEGAL-ENTITY NOPRINT EXP-PRODUCT NOPRINT -
AMOUNT NEWPAGE

Here the Amount total is being displayed each time. But I want it to be displayed only when input file's particular variable EXP-LEGAL-ENTITY is spaces

Thanks
Tania
tania
 
Posts: 5
Joined: Thu Feb 12, 2009 11:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort issue -Multiple Easytrieve reports writing to same file

Postby dick scherrer » Sat Feb 21, 2009 5:57 am

Hi Tania,

But I want it to be displayed only when input file's particular variable EXP-LEGAL-ENTITY is spaces
I'm not aware of the totaling options being able to do this - EXP-LEGAL-ENTITY is a data field in the input and the control totals are summarized. Possibly i misunderstand. . .

Which release of Easytrieve is used on your system?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post