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
 
Syncsort cumulative sum of a field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
skrishnavijay

New User


Joined: 26 Sep 2007
Posts: 25
Location: chennai

PostPosted: Mon Sep 29, 2008 4:02 pm    Post subject: Syncsort cumulative sum of a field
Reply with quote

Hello all,

I have input file of this format.

my input

1 10
2 21
3 15
4 02

o/p

1 10 10
2 21 31(10+21)
3 15 46(10+21+15)
4 02 48(10+21+15+02)

Krishna
Back to top
View user's profile Send private message

Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Oct 15, 2008 11:30 pm    Post subject:
Reply with quote

Try this:
Code:
//SYSIN   DD *                                                   
   SORT FIELDS=COPY                                     
   OUTFIL SECTIONS=(1,1,                                         
   TRAILER3=(1,4,6:SUB=(3,2,ZD,LENGTH=4,M10))),
   NODETAIL,REMOVECC
Back to top
View user's profile Send private message
skrishnavijay

New User


Joined: 26 Sep 2007
Posts: 25
Location: chennai

PostPosted: Thu Nov 06, 2008 7:22 pm    Post subject:
Reply with quote

Thanks a lot Alissa Margulies...!!

I have been waiting for the reply for a long time

Thanks,
Krishna
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Nov 06, 2008 7:45 pm    Post subject:
Reply with quote

Sorry for the delayed response. It was just one of those posts that slipped by until someone else brought it to my attention. Glad I could eventually help.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

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