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: 7306

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 Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 2 Wed Mar 22, 2017 7:46 am
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


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