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 Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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