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
 

 

numeric field overflow in syncsort

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

New User


Joined: 15 Mar 2006
Posts: 14

PostPosted: Fri Mar 17, 2006 11:01 am    Post subject: numeric field overflow in syncsort
Reply with quote

hi ,
i have a huge file containing millions of records.i want a sum of a particular numeric field for all the records.I am using syncsort and using
TRAILER1=(1:TOT=(2,11,ZD,M11,LENGTH=15))
BUT as syncsort only allow upto max lenght 15 i am not able to get the sum as my output is a 20digit no.
I know that in dfsort we can overcome this as dfsort has max lenght upto 31.
But I cant use dfsort.If somebody can give me a jcl code whcih can achieve this with syncsort,I will be greatful to him/her.
Back to top
View user's profile Send private message

fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Fri Mar 17, 2006 6:37 pm    Post subject:
Reply with quote

Hi,

if at all you want to achieve this using SYNCSORT try appending a string at the end of the record say

u have a records like
111111111 11111 2222
222222222 22222 3333
make it as
111111111 11111 2222 aaaaaaa
222222222 22222 3333 aaaaaaa

Now use a sort fields as the last string and the SUM FIELD as ur amount field here is the sort card for the above record having length 20

sort fields=(22,7,ch,a)
inrec field=(1,21,c'aaaaaaa')
sum fields=(11,5,zd)
outrec fields=(1,22)

The result would be 111111111 33333 2222

Hope this might be useful

Regards,
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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts ESQA overflow - high ECSA utilization vasanthz All Other Mainframe Topics 1 Thu Dec 29, 2016 7:06 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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