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



>Date: Tue, 11 Dec 2001 17:09:19 -0500
>From: "Andrew Borts" <Andrewb@SETACORPORATION.com>
>
>Is 5I 0 the same as 2B 0?

No, 5I 0 and 2B 0 are both stored in 2-byte binary
form but 2B 0 only has a range of -99 to +99.  With
MAX(300), your 2B 0 code would fail if you had more
than 99 entries.

4B 0 is closer and would work for your purpose.  But the
RPG equivalent of the "binary length 2" used for CMD
parms, APIs etc is 5I 0.  ("binary length 4" is 10I 0.)

RPG's B-binary type is a decimal type stored in binary
form.  It gets converted to packed whenever it's actually
used in the program, and has the same range as the packed
type.  RPG's I-binary (or "integer") type is a true binary
type with the full binary range (for 2 bytes, it's -32768
to 32767).

Barbara Morris



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.