IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort - Group Report


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sun Oct 05, 2014 2:26 pm
Reply with quote

Hi, can someone plz help me with this? I tried many ways but doesn't give me correct result.

Input:
Code:
Day          Pgms           Person
1,7           10,8            20, 30     (Start Position, Legth)
-----------------------------------
day1         P1               X1
day1         P1               X1
day1         P1               X2
day1         P2               X3
day2         P1               X1
day2         P3               X4
day2         P3               X5


Output:
Code:
Day         Pgm            total
Day1       P1               2 (X1 used twice so counting only once)
Day1       P1               1
Day2       P2               2
day2        P3               2


can u plz help?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Oct 05, 2014 5:13 pm
Reply with quote

Did you try OUTFIL reporting functions? SECTIONS with TRAILER3 and COUNT?

Can you show some of the things you did try?
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sun Oct 05, 2014 7:53 pm
Reply with quote

Yes, I did try.

Code:
SORT FIELDS=(1,7,ZD,A,11,8,CH,A,26,2,CH,A)                       
INCLUDE COND=(1,7,CH,NE,C'000')                                 
OUTFIL FNAMES=SORTOUT,NODETAIL,LINES=60,                         
SECTIONS=(01,07,11,08,                                           
TRAILER3=(5:1,7,25:11,08,44:COUNT)),                             
HEADER1=(15:'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -   REPORT'),     
HEADER2=(/,5:'PAGE : ',PAGE,'     REPORT DATE : ',DATE=(MD4/),   
          '        TIME : ',TIME,//,                             
        05:'DATE    ',22:' XXXX ',45:' COUNT ',/,           
        05:'********',22:'**********',45:'*******'),             
TRAILER1=(/,15:'XXXXXXXXXXXXXXXXXXXXXXXXXXXX:',SUBCOUNT)         


but it is not considering the condition where if same person uses a program on same day, I want to count it as one.

Output:
Code:
DATE             XXXX               COUNT
********         **********             *******
2014263             P1                         35790
2014263             P2                         36411


above output, P2 didn't eliminate the duplicates in count of X2.
[/quote]
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Sun Oct 05, 2014 8:25 pm
Reply with quote

got the answer... I just had to put SUM FIELDS. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top