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



How are you translating the procedure name to a pointer? I know it's in an array, but how does the array get populated with the pointers? What it boils down to: Are you calling QleActBndPgm, if so, what are you specifying for activation group in that call?

Aside from that, I don't know what to suggest... can you show me a simple piece of code that reproduces the same problem?


MattLavinder@xxxxxxxxxxxxxxxxxxx wrote:

I am working with procedure pointers. I have written a service program
that I am using to allow me to call procedures dynamically based on user
input. I use a procedure in the service program to "register" some local
procedures within the calling program and assign each a name that will
identify the procedure. These name and pointer are stored in arrays within
my service program, and are given the same index. Then I use a "handle"
procedure to call the correct procedure based on its assigned name. This
allows the procedure to be called by a variable. I use %lookup to find the
name that matches the variable, and use that index to fetch the
corresponding pointer from the pointer array. So far, this all seems to be
working as intended.

The problem has to do with files not being opened when the procedure is
called. The first thing my program does is open the file it needs. Then
it registers the exposed procedures, retrieves input and finally uses my
"handle" procedure to call the right procedure. This is where the problem
occurs. The right procedure is called, but I get a "I/O operation was
applied to closed file ..." message when I attempt to access the file. The
program is using a named activation group and everything is running within
the same job, so I am not sure why the file would be closed. Any idea why
I would open this file, and then when call a procedure with in the same
program, it tells me the file is closed?

Matt

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
______________________________________________________________________


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.