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



Ahh yes, BINDEC. Or, B in fixed format. This is an old binary format that
has been largely given up for INT and UNS.

So BINDEC is a decimal number like Zoned or Packed, but stored internally
as an integer. BINDEC(digits{:decimal places}) has two parameters, digits
and optionally decimal positions that work exactly like the digits and
decimal places for Zoned and Packed numbers. The internal length of a
BINDEC number is 1 byte (for digits up to 2), 2 bytes (for digits up to 4),
or 4 bytes (for digits up to 9). So a BINDEC(4,2) number equal to 12.34
would be stored internally in two bytes as 0000 0100 1101 0010. The
leftmost bit is the sign bit, and negative numbers are stored in two's
complement format.

On Thu, Mar 16, 2023 at 9:55 AM Mihael <mihael@xxxxxxxxxxxxxx> wrote:

He probably meant BINDEC instead of BINDED (probably a typo).


https://www.ibm.com/docs/en/i/7.4?topic=keywords-bindecdigits-decimal-positions


On 16.03.23 14:53, Mark Murphy wrote:
I just searched the v7.5 RPGLE Reference PDF, and can find nothing
related
to BINDED. Can you be more specific?

On Thu, Mar 16, 2023 at 9:10 AM Alan Cassidy <cfuture@xxxxxxxxxxx>
wrote:

I just now noticed this data definition keyword.

Do I understand correctly that this data type is stored internally as if
it were an integer but when used it shows with the number
of//decimal//places specified?

--Alan Cassidy

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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.