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
 
How to sum up the values of columns and put it in a new col

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

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Jul 30, 2009 12:15 pm    Post subject: How to sum up the values of columns and put it in a new col
Reply with quote

Input file structure
FLD1 FLD2 FLD3 AMT1 AMT2 AMT3

Required output file
FLD1 FLD2 FLD3 AMT1 AMT2 AMT3 SUM

Where SUM = AMT1+AMT2+AMT3

Is this possible in SYNCSORT?

I cannot use DFSORT or ICETOOL as of now.

Let me know if there is any option.

Thanks in advance.
Back to top
View user's profile Send private message

Bhargav_1058

New User


Joined: 13 Dec 2008
Posts: 53
Location: New York

PostPosted: Thu Jul 30, 2009 4:05 pm    Post subject:
Reply with quote

Hi,

The below sort will gives you the desired output.

Input:
Code:
----+----1----+----2----+----3---
FLD1 FLD2 FLD3 AMT1 AMT2 AMT3 SUM


Code:
OPTION COPY                                       
OUTREC OVERLAY=(31:(16,4,ZD,ADD,21,4,ZD,ADD,26,4),EDIT=(TTTT))
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Jul 30, 2009 4:46 pm    Post subject: Reply to: How to sum up the values of columns and put it in
Reply with quote

Thanks a bunch Bhargav. It worked, otherwise i was planning to use EZTRIEVE for doing this process. Thanks again.
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 Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

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