×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Yes, you should be able to. Also, your procedure does not match what you
are passing. You have a %Size declaration but it is not in your procedure
declaration.


On Sun, Jun 9, 2013 at 10:05 PM, Mike Wills <mike@xxxxxxxxxxxx> wrote:

I am using Scott's (is a last name REALLY needed?) IFS logic. Long ago
I must have written a wrapper to make it simpler to understand. I
guess I set it up as a pointer when I wrote it. I don't know why
except that is what the write() was expecting.

P WriteBuffer B EXPORT
D WriteBuffer PI 10I 0
D fileDesc 10I 0 VALUE
D buffer * VALUE

D* Local fields
D retField S 10I 0

/free
return write(fd: %addr(buffer):%size(buffer));
/end-free
P WriteBuffer E

Should I be able to change that to a string (assuming it isn't used)
and leave the rest the same? Man I feel rusty on RPG... all this C# is
messing with my RPG skillz. :-(
--
Mike Wills
http://mikewills.me


On Sun, Jun 9, 2013 at 10:45 PM, Alan Campin <alan0307d@xxxxxxxxx> wrote:
The question is why pass a pointer to the data. That is dangerous. You
can
pass as a Const or by Reference and the system will pass a pointer to the
data and you can process as an ordinary data variable in the procedure.
Is
the data extremely large or something?


On Sun, Jun 9, 2013 at 9:37 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx
wrote:

Hi Mike

That is the procedure address - the address of a procedure.

If you need to pass a pointer to a procedure, you can declare the
prototype with a regular variable - that will pass the pointer to the
variable.

But if you absolutely must prototype it as a pointer, then you can use
the %addr() function on a variable.

HTH
Vern

On 6/9/2013 10:24 PM, Mike Wills wrote:
I am creating a file on the IFS. The procedure I am using is expecting
a pointer to the data I am writing. Is that the %paddr() BIF? It has
been so long since I did more advanced RPG that I can't recall.

--
Mike Wills
http://mikewills.me

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


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

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



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