MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Coding Zoned Decimal Data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jayram99
Beginner


Joined: 16 Aug 2004
Posts: 52
Topics: 21
Location: falls church.va,usa

PostPosted: Tue May 20, 2008 8:35 am    Post subject: Coding Zoned Decimal Data Reply with quote

Hi,

I have data in the Dataset as below.

1 000092029.37
2 000068176.62
3 000100868.39
4 000046831.64
5 000181287.99

The output i should i get is
489194.01

Want to sum the values from 3,12 using SYNCSORT utility. I tried with the methods specified in the forum but getting S0C7.

Please suggest me.

Jay
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Tue May 20, 2008 8:56 am    Post subject: Reply with quote

It whould help if you showed the control cards you are using. Those are not zoned decimal numbers (. is not a number).
Back to top
View user's profile Send private message
vij
Beginner


Joined: 13 Dec 2002
Posts: 6
Topics: 2

PostPosted: Tue May 20, 2008 9:29 am    Post subject: Reply with quote

Code:
//*-------------------------------------------------------------------*
//S2        EXEC PGM=SORT                                             
//SYSOUT    DD SYSOUT=*                                               
//SORTIN    DD *                                                       
000092029.37                                                           
000068176.62                                                           
000100868.39                                                           
000046831.64                                                           
000181287.99                                                           
//SORTOUT   DD SYSOUT=*                                               
//SYSIN     DD *                                                       
 INREC FIELDS=(C' ',1,9,11,2)                                         
 SORT FIELDS=(1,1,CH,A)                                               
 SUM FIELDS=(2,11,ZD)                                                 
 OUTREC FIELDS=(2,9,C'.',11,2)                                         
//*-------------------------------------------------------------------*
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue May 20, 2008 9:46 am    Post subject: Reply with quote

If you had looked first you would have found a section in the DFSORT Tricks document titled"Sum a number with a decimal point" which is exactly what you want.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group