View previous topic :: View next topic
|
Author |
Message |
vinodkumarrs
New User
Joined: 31 Mar 2008 Posts: 8 Location: india
|
|
|
|
Hi,
I want to sort a file such that a particular field should be treated without sign.The field is given UFF format, but i am not getting the desired output.
I am using ICETOOL and the sort card is
SORT FIELDS=(1,80,CH,A,
81,7,UFF,A,
88,8,CH,A,
104,47,CH,A)
The expected output is
Code: |
<--80---><--7--><---8--><--8---><---47---->
XXXXXXXXX000100}00074568YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000100{00074568YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000110}00032145YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000110{00032145YYYYYYYYXXXXXXXXXXX |
But the current output is
Code: |
<--80---><--7--><---8--><--8---><---47---->
XXXXXXXXX000100}00074568YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000110}00032145YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000100{00074568YYYYYYYYXXXXXXXXXXX
XXXXXXXXX000110{00032145YYYYYYYYXXXXXXXXXXX |
please suggest a solution..
regards,
Vinod |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Those are ZD values with C and D signs. You can't use UFF format for those type of values.
Are you trying to treat all of the ZD values as if they had C signs ... so for example X'F0F0F0F1F0F0D0' (-1000) should be treated as X'F0F0F0F1F0F0C0' (+1000)?
What is the RECFM and LRECL of your input file? |
|
Back to top |
|
|
vinodkrs
New User
Joined: 25 Mar 2008 Posts: 10 Location: india
|
|
|
|
Yes, i need only the value of the variable. For example +1000 and -1000 should be treated same so they should be grouped together. The RECFM is FB and the LRECL is 2900 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you replace
81,7,UFF,A
with
81,6,BI,A,87.4,0.4,BI,A
you will get what you want. This tells DFSORT to ignore the sign (first nibble) in the last byte. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Frank Yaeger wrote: |
81,6,BI,A,87.4,0.4,BI,A |
Cute, I was wondering just how you would do it.....
Funny thing is that just this morning, while searching for another problem (something to do with dynamically creating an OUTREC statement with a SEQNUM built into it), I discovered the bit selectiveness of the BI format..... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
DFSORT has had bit sorting for decades, but for some reason people tend to forget it's there. It does come in handy sometimes. |
|
Back to top |
|
|
|