View previous topic :: View next topic
|
Author |
Message |
mannepalli
New User
Joined: 05 May 2008 Posts: 9 Location: Bangalore
|
|
|
|
Hi ..
I'm facing a problem in DFSORT while doing sorting signed binary numbers.
Example: in my input file i have (s9(8) comp) binary numbers and doing the sort in ascending order.
input file:
-3,
-5,
-1,
8,
9
out put file:
8,
9,
-5,
-3,
-1.
out put expected:
-5,
-3,
-1
8
9
How can i achieve the expected results..
Srinivas |
|
Back to top |
|
|
smijoss
Active User
Joined: 30 Aug 2007 Posts: 114 Location: pune
|
|
|
|
but your input and output data is not binary !!!!!!!!! |
|
Back to top |
|
|
mannepalli
New User
Joined: 05 May 2008 Posts: 9 Location: Bangalore
|
|
|
|
its in binary only ..to make it understandable i have given in numbers. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
mannepalli wrote: |
its in binary only ..to make it understandable i have given in numbers. |
show us the hex. |
|
Back to top |
|
|
mannepalli
New User
Joined: 05 May 2008 Posts: 9 Location: Bangalore
|
|
|
|
input file in HEX FORMAT:
FFFFFFFD = -3
FFFFFFFB = -5
FFFFFFFF = -1
0000008 = 8
0000009 = 9
Sort card= sort fields=(1,4,BI,A)
output file in HEX FORMAT:
0000008 = 8
0000009 = 9
FFFFFFFB = -5
FFFFFFFD = -3
FFFFFFFF = -1
Out put is logically its correct as per storage but mathamatically incorrect.
I'm just looking for solution.
Thanks.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Post your job including the control statements |
|
Back to top |
|
|
mannepalli
New User
Joined: 05 May 2008 Posts: 9 Location: Bangalore
|
|
|
|
JCL step for SORT that i used;
Code: |
//STEP020 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=input file,disp=shr
//SORTOUT DD DSN=out put file,
// DISP=(NEW,CATLG,DELETE),
// UNIT=(SYSDA,25),
// DCB=(*.SORTIN),
// SPACE=(TRK,(100,100))
//SYSIN DD *
SORT FIELDS=(15,4,BI,A)
/*
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
BI is unsigned binary,
try FI |
|
Back to top |
|
|
mannepalli
New User
Joined: 05 May 2008 Posts: 9 Location: Bangalore
|
|
|
|
Perfect .. ..its working ..
Thanks Alot.. .. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
|