IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

numeric field overflow in syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top