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
 
Addition of value in each record using DFSORT

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

New User


Joined: 09 Sep 2007
Posts: 10
Location: Chennai

PostPosted: Fri Feb 01, 2008 8:01 pm    Post subject: Addition of value in each record using DFSORT
Reply with quote

Hi,
I have a requirement where I have to add the values of each record in a file and write the total to a different file.
For Ex.
I/P File:
123-->each line is different record in the same file.
234
111
222
O/P File:
690.
Is it possible to do the above arithmetic opeartion using sort.

Thanks
Baskaran Gunasekaran.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Fri Feb 01, 2008 8:29 pm    Post subject:
Reply with quote

Code:
//*******************************************
//S1       EXEC  PGM=ICEMAN                 
//SYSOUT   DD  SYSOUT=*                     
//SORTIN   DD *                             
123                                         
234                                         
111                                         
222                                         
/*                                           
//SORTOUT  DD SYSOUT=*                       
//SYSIN    DD    *                           
  SORT FIELDS=COPY                           
  OUTFIL REMOVECC,NODETAIL,                 
      TRAILER1=(1:TOT=(1,3,ZD,M11,LENGTH=3))
/*                                           
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

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