Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SECTIONS= summarization with multiple key fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Sat Aug 06, 2011 1:32 am    Post subject: SECTIONS= summarization with multiple key fields
Reply with quote

Hi,
I am sure I will be able to get this done with DISPLAY or some other mechanism no doubt but I was curious as to whether I can use multiple input fields in a SECTIONS clause to get a count and total. I have used the following approach previously to create a data set:
Code:

SORT FIELDS=(21,7,CH,A)                                   
OUTFIL REMOVECC,NODETAIL,                                 
SECTIONS=(21,7,                                           
 TRAILER3=(21,7,' ',COUNT=(EDIT=(IIII)),                   
          ' ',TOTAL=(092,11,ZD,EDIT=(III,III,III,IIT.TT))))

works great for user spreadsheets. Now I have to summarize on 3 of these fields. Maybe the Sections= can look like this:

Code:

SECTIONS=(21,7,30,6,55,2                       
 TRAILER3=(21,7,30,6,55,2,' ',COUNT=(EDIT=(IIII))
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Aug 06, 2011 1:53 am    Post subject:
Reply with quote

Well, this would be correct syntax:

Code:

   OUTFIL SECTIONS=(21,7,30,6,55,2,                       
     TRAILER3=(21,7,30,6,55,2,' ',COUNT=(EDIT=(IIII))))   


but you really didn't say what you want as output. For this input:

Code:

----+----1----+----2----+----3----+----4----+----5----+---
                    AAAAAAA  BBBBBB                   CC 
                    AAAAAAA  BBBBBB                   CC 
                    AAAAAAA  BBBBBB                   CC 
                    AAAAAAA  BBBBBB                   DD 
                    AAAAAAA  BBBBBB                   DD 
                    AAAAAAA  BBBBBB                   EE 
                    AAAAAAA  CCCCCC                   EE 
                    AAAAAAA  CCCCCC                   EE 
                    AAAAAAA  CCCCCC                   EE 
                    AAAAAAA  CCCCCC                   FF 
                    AAAAAAA  CCCCCC                   FF 
                    AAAAAAA  CCCCCC                   FF 
                    BBBBBBB  CCCCCC                   FF 
                    BBBBBBB  CCCCCC                   GG 
                    BBBBBBB  CCCCCC                   GG 


SORTOUT would have:

Code:

                    AAAAAAA  BBBBBB                   CC     
                    AAAAAAA  BBBBBB                   CC     
                    AAAAAAA  BBBBBB                   CC     
AAAAAAABBBBBBCC    3                                         
                    AAAAAAA  BBBBBB                   DD     
                    AAAAAAA  BBBBBB                   DD     
AAAAAAABBBBBBDD    2                                         
                    AAAAAAA  BBBBBB                   EE     
AAAAAAABBBBBBEE    1                                         
                    AAAAAAA  CCCCCC                   EE     
                    AAAAAAA  CCCCCC                   EE     
                    AAAAAAA  CCCCCC                   EE     
AAAAAAACCCCCCEE    3                                         
                    AAAAAAA  CCCCCC                   FF     
                    AAAAAAA  CCCCCC                   FF     
                    AAAAAAA  CCCCCC                   FF     
AAAAAAACCCCCCFF    3               
                    BBBBBBB  CCCCCC                   FF   
BBBBBBBCCCCCCFF    1                                       
                    BBBBBBB  CCCCCC                   GG   
                    BBBBBBB  CCCCCC                   GG   
BBBBBBBCCCCCCGG    2                                                                 
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 Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am
No new posts Using multiple routines at exit 6 in ... Randy Horowitz All Other Mainframe Topics 2 Sat Feb 10, 2018 11:57 pm

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