× 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.



Vernon Hamberg wrote:

Y'all

I'm working on some conversion stuff and am looking at how binary numbers work on the iSeries. I've run across some curious things.

Then I

SELECT HEX(BIN2P1) FROM BINTEST

and it displays 012F. Oops - that is a packed field with digits 12.
It is very likely that SQL does a hidden "CAST" when reading a binary field.

Then I DSPPFM BINTEST and press F10 & F11, to see the hex values. It shows 000C, which is 12 in decimal.

BTW, SQL does not have a binary type of this variety - it has only the INT variations. So there are no issues of decimal (binimal) points.

Weird? Of course, IBM have always said the in RPG a B and an I are not the same thing.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.