Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort - Group Report

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort - Group Report
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7270

PostPosted: Sun Oct 05, 2014 5:13 pm    Post subject: Reply to: Sort - Group Report
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us