Control totals using control sequence sum



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

Control totals using control sequence sum

Postby kamal » Mon Jun 09, 2008 3:26 pm

I have an Input file as shown below:

position
1 to 2 3 to 4 5 to 6
Company Dept Amt
C1 D1 10
C1 D1 10
C1 D1 10
C1 D1 10
C1 D1 10
C1 D2 10
C1 D2 10
C1 D2 10
C1 D3 10
C2 D4 20
C2 D4 20
C2 D4 20
C2 D4 20
C2 D4 20
C2 D5 20
C2 D5 20
C2 D6 20
C2 D6 20


I need only the control totals of Company and dept in my o/p as :
C1 90
D1 50
D2 30
D3 10
C2 180
D4 100
D5 40
D6 40



how can this be done ?
I tried following code.
LIST ON                                                               
*******************************************************************   
FILE PRTFL01 PRINTER FB(133 0)                                         
*******************************************************************   
FILE PERSNL FB(571 5710)                                               
IN-AMT                             5  02  N                         
IN-COMP                           1  02  A                             
IN-dept                             3  02  A                             
*                                                                     
 JOB INPUT PERSNL NAME FIRST-PROGRAM                                   
 PRINT PAY-RPT                                                         
 REPORT PAY-RPT LINESIZE 132 PRINTER PRTFL01 NOADJUST                 
 SEQUENCE IN-COMP  IN-DEPT                           
 CONTROL IN-COMP  IN-DEPT                           
 SUM IN-AMT                                                           
 TITLE 01 '         REPORT TALLY . '
 LINE 01  IN-COMP  IN-DEPT IN-AMT                     



Only control totals are required after company change and dept change.
Did not understand the working of sum control and sequence together. Please advice.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Control totals using control sequence sum

Postby dick scherrer » Mon Jun 09, 2008 9:58 pm

Hello,

From that input what is the output?
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: Control totals using control sequence sum

Postby kamal » Mon Jun 16, 2008 2:49 pm

The output should be as follows:
C1 90
D1 50
D2 30
D3 10
C2 180
D4 100
D5 40
D6 40
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Control totals using control sequence sum

Postby dick scherrer » Mon Jun 16, 2008 11:21 pm

Hello,

That appears to be the same as what was posted for the requirement. . .

What happens when you run the code you posted?
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: Control totals using control sequence sum

Postby kamal » Tue Jun 17, 2008 5:55 pm

Sorry for the confusion.Please see the attcahed output.
You do not have the required permissions to view the files attached to this post.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Control totals using control sequence sum

Postby dick scherrer » Tue Jun 17, 2008 11:41 pm

Hello,

The attached output is the "normal" way to group totals.What you show as the desired output is not at all typical. You want "summaries", but you want them in a sort of nested sequence.

I'm not aware of this being a capability of Easytrieve.

What you could do is read the output from the summary job and create a new set of totals based on your requirement.
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