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

Summary Reports


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

New User


Joined: 13 Oct 2006
Posts: 3

PostPosted: Fri Oct 13, 2006 5:06 pm
Reply with quote

Hi,

I have 3 files in the below format -

File1
AAA BBB CCC
31.00 34.00 24.00

File2
AAA BBB CCC
30.00 34.00 24.00

File3
AAA BBB CCC
30.00 34.00 24.00

I need an output with the sum under each header as follows -

Output file -
AAA BBB CCC
91.00 102.00 72.00

Can anyone suggest a solution for this?

Thanks in advance,
Gopikrishnan K
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Oct 13, 2006 9:06 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. Be sure to use MOD for the //OUT DD.

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CON DD DSN=...  input file1
//    DD DSN=...  input file2
//    DD DSN=...  input file3
//OUT DD DISP=MOD,DSN=...  output file
//TOOLIN DD *
COPY FROM(CON) TO(OUT) USING(CTL1)
COPY FROM(CON) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
* Get header
  OPTION STOPAFT=1
/*
//CTL2CNTL DD *
* Get total for detail records
  OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
    OMIT=(1,1,CH,EQ,C'A'),
    TRAILER1=(1:TOT=(1,6,UFF,EDIT=(IIT.TT)),
              13:TOT=(13,6,UFF,EDIT=(IIT.TT)),
              24:TOT=(24,6,UFF,EDIT=(IIT.TT)))
/*
Back to top
View user's profile Send private message
Gopikrishnan K

New User


Joined: 13 Oct 2006
Posts: 3

PostPosted: Mon Oct 16, 2006 12:11 pm
Reply with quote

Hi Frank,


That was absolutely what I required. Thanks a ton.

Thanks,
Gopikrishnan K
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 JPM Reports for each DB2 V12 Function... DB2 0
No new posts Mainframe batch Job or REXX to get VT... CLIST & REXX 7
No new posts Splitting of single report to seperat... TSO/ISPF 7
No new posts Produce Mainframe Dash Board Reports ... All Other Mainframe Topics 2
No new posts Get Record count in summary record fo... DFSORT/ICETOOL 21
Search our Forums:

Back to Top