IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT Report - Subset Summary


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Jul 11, 2012 4:08 pm
Reply with quote

Hi
How to achieve this using SORT.

Input:
Code:
AAA1210
AAA1420
BBB1210
BBB1420
BBB2430
CCC1210
CCC1210


Output: In Report
Code:
Field1     Field2    Field3
AAA        12         10
AAA        14         20
--------------------------
AAA        26         30
--------------------------

BBB        12         10
BBB        14         20
BBB        24         30
--------------------------
BBB        50         60
--------------------------

CCC        12         10
CCC        12         10
--------------------------
CCC        24         20
--------------------------

--------------------------
TOT       100        110
--------------------------


I am able to creater Header, Data, Trailer like this

Code:
Field1     Field2    Field3
AAA        12         10
AAA        14         20
BBB        12         10
BBB        14         20
BBB        24         30
CCC        12         10
CCC        12         10
--------------------------
TOT       100        110
--------------------------
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 11, 2012 4:22 pm
Reply with quote

So you need to go "down" a level. Did what you used for the header and trailer give you a clue that there might be options of those that lead you to an answer?
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Jul 11, 2012 4:30 pm
Reply with quote

publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.iceg200/ice1cg4038.htm

SECTIONS in OUTFIL should help, will give it a try.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jul 11, 2012 10:12 pm
Reply with quote

Hameedali,

Use the following DFSORT JCL which will give you the desired results
Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                         
AAA1210                                                 
AAA1420                                                 
BBB1210                                                 
BBB1420                                                 
BBB2430                                                 
CCC1210                                                 
CCC1210                                                 
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                         
  OPTION COPY                                           
  OUTFIL REMOVECC,BUILD=(1,3,12:4,2,22:6,2,30:X),       
  HEADER2=('FIELD1     FIELD2    FIELD3'),             
  SECTIONS=(1,3,                                       
  TRAILER3=(30'-',/,1,3,                               
            10:TOT=(4,2,ZD,M10,LENGTH=4),               
            20:TOT=(6,2,ZD,M10,LENGTH=4),/,30'-')),     
  TRAILER1=(//,30'-',/,'TOT',                           
            08:TOT=(4,2,ZD,M10,LENGTH=6),               
            18:TOT=(6,2,ZD,M10,LENGTH=6),/,30'-')       
//*
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Sat Jul 14, 2012 8:03 pm
Reply with quote

Thank You.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top