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



Well, sorta. The name is statically bound at compile time. At run time you
cannot select the name of a service program. It loads whatever service
program name you have specified at compile time searching the library list
for it. To be unbound, I am saying, or at least as I see it, that the
service program and procedure name cannot be known at compile time. It
sounds like they are trying to do this without loading the service program
at run time but I would not call it unbound since you are passing the
address of a procedure determined at compile time. I would have to know
more about what they are trying to do.


On Mon, Jan 21, 2013 at 2:33 PM, Anderson, Kurt <KAnderson@xxxxxxxxxxxx>wrote:

Aren't service programs, by definition, dynamically bound? A static bind
being something like binding a module into a program object.

-Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Alan Campin
Sent: Monday, January 21, 2013 1:55 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Unbound procedure call

And where are you going to get the address? The address would be different
every time. If you use %PAddr the address is determined at compile time.

The only way I know to do this is to use system functions to dynamically
bind to a service program and procedure. See
www.think400.dk/downloads.htmand look at my Dynamic Service program load
service program.


On Mon, Jan 21, 2013 at 1:39 PM, Dave <dfx1@xxxxxxxxxxxxxx> wrote:

Hi all,

I was asked in an interview how I would go about coding a call to a
procedure so that no binding to that procedure would occur at
compilation.
I said I would need to have the addresses of the callable procedures
and I would have a generic prototype based on a pointer that called
the procedure indicated by its address. Depending upon what the
program needed to do I would initialise that pointer so the right
procedure would be called.
This was a test to get an idea of my RPG skills, but I discovered that
this was a technique favoured by the shop. I did not dare ask why
would they want to use this technique, so I'm asking : why would you
really want to do it this way? Why not just use a SELECT statement?
--
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-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.