Seemed to me that there was a post, way back when, that had some instructions for mapping API data types to RPG types. Perhaps there is an FAQ somewhere?

What I would like is some general instructions on how to properly define variables in my prototypes for system API calls. For example, I am working with QSZRTVPR API and it has the following format:

1     Receiver variable     Output     Char(*)
2     Length of receiver variable     Input     Binary(4)
3     Format name     Input     Char(8)
4     Product information     Input     Char(*)
5     Error code     I/O     Char(*)

Optional Parameter:

6     Product information format name     Input     Char(8)

What I would like is something that says:

Binary(4) maps to 10I
Char(*) maps to (? don't know)
Char(8) to 8A

Also whether or not the value keyword is needed. Anything special for I/O vs Input or output. That kind of thing.

Yes, this is basic stuff and yes, I suppose a properly trained RPG programmer would know this stuff, but I recently transitioned to RPG IV (free form mostly) and some of this stuff is just tough to get your arms around (especially when Java and C++ also intrude into the programming mix on a daily basis).

Perhaps an FAQ entitled "How to prototype and use system API's"? Although I know we can't document all the API's, general "rules" about how to do it would be helpful. Perhaps it is already in a post. If so I'd gladly format them into an FAQ or stuff them in the Wiki.

Seems that I have seen something like this somewhere in the past...if so, sorry for the waste of time...could you point me to it.

Pete Helgren


This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.