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


  • Subject: Re: RPG400-L Digest V3 #74
  • From: PARKIB@xxxxxxxxxx
  • Date: Wed, 7 Feb 2001 11:20:20 +0000



>>Hmm... So you're saying, Scott, that it's not their job to show us how
>>to use these APIs in RPG.  1 page in the beginning of the manual showing
>>how to declare each variable in each language would be sufficient.  But
>>we don't even have that.

>>So, if it's not the job of the API manual to show us how to use them,
what
>>is the job of the API manual?  And, yes, I realize I am splitting hairs,
but
>>how many RPG programers haven't used the APIs just because the
documentation
>>didn't explain how to use them in *their* language, RPG?

>>I know C, I know binary, I know pointers, but no way could I have told
you
>>to code their 4B as 10i 0!!!

May I respectfully refer you to the API documentation in the Infocenter for
V4R5

I have extracted the following text from the section entitled,

Data Types and Parameter Coding
---------------------------------------------------------------------------------
Binary Data

In the API parameter tables in this book, BINARY(2) and BINARY(4) represent
 numeric
data. These parameters must be signed, 2- or 4-byte numeric values with a
precision of 15 (halfword) or 31 (fullword) bits and one high-order bit for

the sign. Numeric parameters that must be unsigned 4-byte numeric values
are
explicitly defined as BINARY(4) UNSIGNED.

When you develop applications that use binary values, be aware that some
high-level
languages allow the definition of binary variables by using precision and
not length.
For example, an RPG definition of binary length 4 specifies a precision of
4 digits,
which can be stored in a 2-byte binary field. For API BINARY(4) fields, RPG
developers should use one of the following:

     Positional notation

     A length of 5 to 9 in order to allocate a 4-byte binary field

     A length of 10 in order to allocate a 4-byte integer field
----------------------------------------------------------------------------------

I hope this helps.
Brian Parkins


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.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.