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

record count with the contol break


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

New User


Joined: 09 May 2006
Posts: 19
Location: chennai

PostPosted: Thu Jul 26, 2007 10:19 pm
Reply with quote

Hi,
I have the following requirements.

Code:

dept    dept-cde    point
-----   ---------   ----------
AAA     001         0.1
AAA     001         0.2
AAA     001         0.3
BBB     002         0.4
BBB     002         0.5
CCC     005         0.6
CCC     005         0.7
CCC     005         0.7


I need the ouput like,

Code:

dept    dept-cde    total-point
-----   ---------   ----------
AAA     001         0.6
BBB     002         0.9
CCC     005         2.0
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: Thu Jul 26, 2007 11:11 pm
Reply with quote

Here's a DFSORT job that will do what I think you asked for:


Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
AAA     001         0.1
AAA     001         0.2
AAA     001         0.3
BBB     002         0.4
BBB     002         0.5
CCC     005         0.6
CCC     005         0.7
CCC     005         0.7
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    SECTIONS=(1,11,
      TRAILER3=(1,20,21:TOT=(21,3,UFF,EDIT=(T.T))))


SORTOUT has:

Code:

AAA     001         0.6
BBB     002         0.9
CCC     005         2.0
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top