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 VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Need urgent suggestion on DFSORT subratarec DFSORT/ICETOOL 6 Wed Mar 21, 2018 8:46 pm
No new posts Copying only first and last word from... chandan.inst SYNCSORT 4 Wed Jan 31, 2018 4:19 pm
No new posts How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm

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