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

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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am


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