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



Steve Richter wrote:
is there a dds equivalent to "10i 0"?

The DDS equivalent is 9b0, but you also have to code EXTBININT(*YES) on your H-Spec to map binary fields (with 0 decimal places) to integer.


Also, if I'm not mistaken, any B field defined in DDS with more than 9 digits is automatically defined as I in the RPG program, regardless of any EXTBININT keyword.


I ran a timing loop that copied between 10i 0 and 9b 0 variables. here are the results: bin to bin was the fastest. int to int was 10% slower than bin to bin. bin to int took twice as long as bin to bin.

any idea why bin to bin runs faster than int to int?

The practical side of this is that I have gotten into the practice of
declaring all integer type variables as 10i 0. But when I have to store such
a field in a database file, I dont know the best way to declare the database
field.


Note that any operations with binary decimal numeric type involve an implicit conversion to packed decimal numeric type. That will slow down any operation involving binary.


Cheers! Hans


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.