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
 
JCL Program required for the below requirement

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

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Tue Apr 15, 2008 3:15 pm    Post subject: JCL Program required for the below requirement
Reply with quote

The requirement is given below.......

I have a file, It has some records with columns department and amount....

department is repeated multiple times... as like this

department amount

100 10
200 10
100 20
300 20
100 20
200 10
100 20
300 30


I need the output like this

department amount

100 70
200 20
300 50


can any one provide the JCL for this.......?


thanks in advance
sreeni
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Tue Apr 15, 2008 3:28 pm    Post subject:
Reply with quote

You want the sort parms to sum amount by department?

if you would provide the DCB parms for the file and the positions of the FIELDS within the records someone will provide the SORT parms necessary.

Which sort do you have? Syncsort or DFSORT?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8620
Location: Back in jolly old England

PostPosted: Tue Apr 15, 2008 3:29 pm    Post subject:
Reply with quote

Or you could search for examples in the SORT forum.
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Apr 15, 2008 3:42 pm    Post subject: Reply to: JCL Program required for the below requirement
Reply with quote

Code:

//STEP1    EXEC PGM=SORT
//SORTIN DD *
100 10
200 10
100 20
300 20
100 20
200 10
100 20
300 30
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
  SORT FIELDS=(1,3,CH,A)
  OPTION ZDPRINT
  SUM FIELDS=(5,2,ZD)
/*
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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

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