Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7312

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 Please help - SORT with SUM fields an... clearskynot DFSORT/ICETOOL 6 Thu Apr 09, 2020 11:01 am
No new posts Include Group record based on detail ... guptae DFSORT/ICETOOL 11 Thu Mar 12, 2020 1:54 pm
No new posts convert SUPERC compare report to side... jzhardy CLIST & REXX 5 Fri Feb 21, 2020 8:55 am
No new posts Help with IF THEN and GROUP prynks91 SYNCSORT 23 Thu Feb 20, 2020 7:22 pm
No new posts Substring for 2 files in Sort JCL Shubhendu Chakraborty DFSORT/ICETOOL 1 Wed Nov 20, 2019 11:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us