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
 

 

DFSORT Report - Subset Summary

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT Report - Subset Summary
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Wed Jul 11, 2012 4:22 pm    Post subject: Reply to: DFSORT Report - Subset Summary
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    Post subject: Reply to: DFSORT Report - Subset Summary
Reply with quote

http://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    Post subject:
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    Post subject: Reply to: DFSORT Report - Subset Summary
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    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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm


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