Which SORT tool do you have?  Syncsort or DFSORT?

Either one comes with the capability to do something like this.

There is a DFSORT Hotline with IBM that you can also ask these types of 
questions.
  dfs...@us.ibm.com

They are very helpful in creating SORT processes like this.

If you have ICETOOL (DFSORT) you can review this manual 
SORTUGPG - User Guide for DFSORT PTFs UK51706 and UK51707 by Frank Yaeger


https://www-304.ibm.com/support/docview.wss?uid=isg3T7000097

Or this paper on Sort Tricks:

http://www-01.ibm.com/support/docview.wss?uid=isg3T7000094



Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Minoru Massaki
> Sent: Sunday, February 12, 2017 6:32 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: SORT - How can I put accumulated value on each output record
> 
> I want to have SORTOUT data as following:
> 
> Input Data
> 
> #001          1           10.5
> #002          5             3.3
> #003       121          120.4
> . . . . . . .
> 
> Output Data Set
> #001          1           10.5             1       10.5
> #002          5             3.3             6        13.8
> #003       121          120.4         127       134.2
> . . . . . . .
> 
> 
> Output forth column is accumulated value with previous records values on 2nd
> column.
> Output 5th column is also accumulated value with previous records values on
> 3rd column.
> 
> Can I make this kind of output by SORT?
> 
> I really appreciate that someone would provide sample of SORT control
> statement to resolve my requirement.
> 
> Minoru Massaki - (M*M)
> 
> --
> 
> 全先 実  -  Minoru Massaki  (M*M)
> E-mail: mmass...@gmail.com
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to