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
 

 

sorting signed variable considering it as unsigned

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vinodkumarrs

New User


Joined: 31 Mar 2008
Posts: 8
Location: india

PostPosted: Wed Apr 09, 2008 10:59 pm    Post subject: sorting signed variable considering it as unsigned
Reply with quote

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
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 10, 2008 12:51 am    Post subject:
Reply with quote

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
View user's profile Send private message
vinodkrs

New User


Joined: 25 Mar 2008
Posts: 10
Location: india

PostPosted: Thu Apr 10, 2008 9:34 am    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 10, 2008 10:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 10, 2008 10:42 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Apr 10, 2008 11:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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