View previous topic :: View next topic |
Author |
Message |
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Fri May 23, 2003 4:13 am Post subject: Binary fields in syncsort. |
|
|
Hi,
I am using syncsort to pass records to an ouput file conditionally. I am using the following control statement :
INCLUDE COND=(27,8,BI,GT, X'hex equivalent of -9999999999')
The problem is the Binary field, it is defined as PIC S9(10) comp and it has both positive & negative values. but when I ckeck the output, only negative numbers GT the -9999999999 are being passed to output file. Numbers like +234556 are being filtered out. Can any one suggest a solution? I have checked that I am using the correct hexdecimal equivalent of -9999999999.
Thanks,
Gore |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri May 23, 2003 5:13 am Post subject: |
|
|
Gore,
Try using FI instead of BI.
Code: |
INCLUDE COND=(27,8,FI,GT,-999999999)
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Sun May 25, 2003 6:53 am Post subject: |
|
|
Thanks kolusu. I found the same in syncsort manual too!! |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Tue May 27, 2003 7:12 am Post subject: |
|
|
Hi,
Now I am facing another problem:
I have value in my binary field : 9223372036854775807 (PIC clause PIC S9(10) COMP)
When i am giving the following condition in my control card it is not selecting that record for output:
Code: |
//SYSIN DD *
INCLUDE COND=(27,8,FI,EQ,9223372036854775807)
SORT FIELDS=COPY
/*
|
The value is there in the input file.Still the RC =0 and nothing is being passed to output file.Can anyone explain why?
Is the number beyond the limits of double word binary?I checked throgh scientific calculator but found the number to be within the limits.
The record is not moving to output file. |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Tue May 27, 2003 10:30 am Post subject: |
|
|
For DFSORT, the limits for a decimal constant compared to an FI field with INCLUDE or OMIT are +2147483647 (X'7FFFFFFF') and -2147483648 (X'80000000'). Larger decimal constants are flagged in error by DFSORT. I suspect Syncsort has the same limits (I don't know why they don't flag it as an error). _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
gore Beginner
Joined: 10 Dec 2002 Posts: 46 Topics: 20 Location: Providence, RI
|
Posted: Thu May 29, 2003 12:42 am Post subject: |
|
|
In the light of above discussion...
Can any one suggest me as to how to estructure this condition(I have to use syncsort.).
Code: |
INCLUDE COND=(27,8,FI,LE,93372036854775600)
|
_________________ Gore |
|
Back to top |
|
|
|
|