Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to sum the columns which are X format

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

New User


Joined: 10 Jan 2008
Posts: 36
Location: CHINA

PostPosted: Mon Feb 16, 2009 11:25 am    Post subject: How to sum the columns which are X format
Reply with quote

Code:
+----6----+----7----+----8----+--
******************* Top of Data *
24~  ~                    23.65~
40~  ~                    15.49~
40~  ~                    15.49~
10~  ~                     0.00~
30~  ~                   -51.51~
00~  ~                    76.12~
01~  ~                    77.64~
05~  ~                   +360.00~
00~59~                    33.49~
03~  ~                     7.28~


I want to sum the columns which begins from 269 to 278.the sort key is from 20 to 24. How to write the sum card? Is there a method that can convert X to numeric format?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 16, 2009 9:48 pm    Post subject:
Reply with quote

Hello,

The data does not match your definition of the data.

Please correct and re-post (use Preview to make sure the post appears correctly to the forum).

To sum the values you've shown, use SFF (signed free form) rather than ZD, PD, etc..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Feb 16, 2009 10:13 pm    Post subject:
Reply with quote

Absinthia,

You can use the technique discussed in the "Sum a number with a decimal point" Smart DFSORT Trick at:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
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
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us