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




On 2012-10-31, at 3:58 PM, midrange-l-request@xxxxxxxxxxxx wrote:

I did find that there is a EXTBININT header spec, but I don't really see the purpose to using it (I mean I know you can then access the 10th digit, in the case of 9b 0, but does that 10th digit get stored on the file?

An integer is defined as 10 long because there can be 10 digits in the number. Historically RPG limited binary to the maximum number of complete _range_ digits - hence 9 because 999,999,999 can be accommodated in a 4 byte integer but 9,999,999,999 cannot.

EXTBINIBT(*YES) tells RPG to leave the binaries as _real_ integers and NOT to attempt to convert them to 9 packed for operational use. That is what happens with the old B type - every time they are used they are converted to packed, the operation performed and then converted back to binary. All to make sure they don't exceed 9 digits. Very inefficient. For compatibility reasons RPG IV did the same as RPG/400 - hence EXTBINIBT(*YES) is not the default.

If you want to continue the conversation please move it to RPG400 or David will descend upon us from a great height.

Are there any gotchas to using the B data type?

Not that I can think of but see above re the performance benefit of of using EXTBINIBT(*YES).

Jon Paris

www.partner400.com
www.SystemiDeveloper.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.