× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Douglas,

This is a zoned field and not packed. In the last byte, the left or upper
nibble has the sign. It could still be invalid with a 'D' in that position
as valid characters have an "D" in the left nibble, like the "N (D5)".

Thanks!

Jim

On Mon, Jul 13, 2009 at 11:16 AM, Douglas Handy <dhandy@xxxxxxxxx> wrote:

select * from file where hex(decfield) like '40%'

Would that work for you?


It would be much safer to check the last byte for x40, or the entire length
of the field. In your example, if the high order 2 digits were 40... you
would have a false match. You need to check the last nibble of the final
byte, which normally is F for positive and D for negative number although
certain other values are permissible (if I mismember right, some mainframes
use C instead of D for negative numbers). But a x40 in the final byte is a
pretty good indication the field was not initialized right.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.