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
 

 

SYNCSORT output values gives me some junk number
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 4:58 pm    Post subject: SYNCSORT output values gives me some junk number
Reply with quote

Guys,
i use Syncsort and when i say,
SUM FIELDS = (139,8,BI)
it says SUM FIELDS OVERFLOW.

i tried to convert it into PD and then do a SUM on it. The syntax is below -

SORT FIELDS=COPY
OUTREC FIELDS=(3,4,11,6,25,4,139,8,BI,TO=PD,LENGTH=3)

The output values gives me some junk number instead of the right ones.

Output value : 235
What i shud be getting : -385

Can you pls help me in this regard.

Thanks a ton.
Vijay
Back to top
View user's profile Send private message

teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 5:39 pm    Post subject:
Reply with quote

Can you help please icon_sad.gif
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 5:40 pm    Post subject:
Reply with quote

Can you show us how the field 139,8 looks like in the input file.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 5:54 pm    Post subject:
Reply with quote

In the Browse view:

-381

..Ç ................Úc
03640000000000FFFFFFF8
12810100010003FFFFFFE3

OUTREC FIELDS=(3,4,11,6,25,4,139,8,BI,TO=PD,LENGTH=3)

51235

----+----1----+----2---
..Ç ..........é.*.....
0364000000000052500000
1281010001000313C00000
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Jul 08, 2008 5:54 pm    Post subject:
Reply with quote

Hi Vijay,

I am not clear about the requirement, Can you please post here sample input and output records?

Thanks,
Arun
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 5:55 pm    Post subject:
Reply with quote

In the Browse view:

INPUT file
-----------

-381

..Ç ................Úc
03640000000000FFFFFFF8
12810100010003FFFFFFE3

after OUTREC FIELDS=(3,4,11,6,25,4,139,8,BI,TO=PD,LENGTH=3)

OUTPUT file
---------------

51235

----+----1----+----2---
..Ç ..........é.*.....
0364000000000052500000
1281010001000313C00000


Hope this is clear.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Jul 08, 2008 6:06 pm    Post subject:
Reply with quote

Vijay,

I dont find much difference between your last two posts.

What is your requirement.? what is the LRECL of the input file? what is its layout? How do you want your output to be?

Thanks,
Arun
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 6:08 pm    Post subject:
Reply with quote

Can you post the input file with the column numbers or just post how -381 is stored in it. I couldn't make it out from your post.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Jul 08, 2008 6:12 pm    Post subject: Reply to: SYNCSORT output values gives me some junk number
Reply with quote

the -381 is the .............fe83 hex
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 6:14 pm    Post subject:
Reply with quote

Hey Arun,
My requirement is simple or generic.
I have a file with over 18 M records, where am sorting per Dept and summing up on a field - Quantity.
Qty is a binary field S9(18) COMP.
when i do a SUM on it...it says SUM FIELDS OVERFLOW.
Since, 8 is the maximum we can have for BI in sort/sum, i would like to do some thing to overcome that OVERFLOW problem.
Hence i thought i will convert it into PD and then do a SUM on it.

and when i did - using TO=PD, my output Quantity is entirely different.

Hence seeking help to correct my syntax.

Thanks,
Vijay
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 6:22 pm    Post subject:
Reply with quote

Thanks enrico. I was searching for the hex representation of 381 rather than -381. My bad.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 08, 2008 6:27 pm    Post subject:
Reply with quote

I beleive BI is unsiged binary, try changing to FI signed binary and doing your sum with that.
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 6:30 pm    Post subject:
Reply with quote

Craq,

You just beat me by few minutes. I was just testing out the FI part.

Vijay,

Try this

Code:
OUTREC BUILD=(1,8,FI,EDIT=(STTTTTTT),SIGNS=(+,-)) 


You can change the EDIT field according to your requirements.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 6:51 pm    Post subject:
Reply with quote

Thanks Manu,

i just gave this as a test

SORT FIELDS=COPY,STOPAFT=10
OUTREC BUILD=(139,8,FI,EDIT=(STTTTTTTTTTTTTTTTTT),SIGNS=(,-))
SUM FIELDS=(139,8)

just as a clarification, is the above thing correct !?
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 7:02 pm    Post subject:
Reply with quote

not sure if you can combine the outrec build and sum fields in the same step. When i tried it completed successfully but didn't sum the fields.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 7:17 pm    Post subject:
Reply with quote

One more clarification,
Do i really need to convert a BI field to FI to avoid a SUM FIELDS OVERFLOW ?

Thanks,
Vijay
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 7:26 pm    Post subject:
Reply with quote

AFAIK we used FI as the field was signed. This has nothing to do with the SUM FIELDS OVERFLOW problem.
Back to top
View user's profile Send private message
teevijay

New User


Joined: 20 Mar 2006
Posts: 22

PostPosted: Tue Jul 08, 2008 7:30 pm    Post subject:
Reply with quote

Then it doesnt solve my problem.
Pls let me know, how to overcome a SUM FIELDS OVERFLOW for a BI field
Solution could be to convert it into a PD field and then do a SUM on it.
---> How do i do it ?

Any other solutions ?


Thanks.
Vijay
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jul 08, 2008 7:49 pm    Post subject:
Reply with quote

teevijay wrote:
Then it doesnt solve my problem.
Pls let me know, how to overcome a SUM FIELDS OVERFLOW for a BI field
Solution could be to convert it into a PD field and then do a SUM on it.
---> How do i do it ?

Any other solutions ?


Thanks.
Vijay


1. IT IS NOT A BI FIELD it is an FI field.

2. When you use a signed binary field that is negative (even a small value) as an unsigned field it will be treated as a very large number.
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Tue Jul 08, 2008 7:57 pm    Post subject:
Reply with quote

Try this in sum fields.


Code:

SUM FIELDS=(139,8,FI)
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 6 Fri Dec 02, 2016 9:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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