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



I have created a module in a service program, that calculates the
dollar value of a loss from a log file record.  The module
occasionally needs to open a file (MEMBR), and chain to a record in
that file.

Because we have multiple companies, the file opened could be in one of
60 or so libraries.  All copies of this file have the same name, same
meber name, and the same format identifier.  I have set up the F spec
with an EXTFILE variable, and when I need to open the file, I close it
if open, resolve the EXTFILE variable, open the file, then chain. 
Done it thousands of times, no problem.

And the service program works beautifully, when called from another
RPG program.  I have set up an SQL function for our 'reporting' users,
and this function calls the module and returns the cost to the SQL
view.  And this works marvelously.  Until it has to use one particular
copy of the MEMBR file.  Just one of our copies, and it is the same
copy that errors out every time.  When the view tries to call the
service program, it errors with the RNX1011 error, on the statement
number in the service program where the CHAIN op is at.  I can use an
RPG program and resolve costs for all records that relate to the same
copy of the MEMBR file, but when I try to use the module from the SQL
function, the certain copy causes the error.

I have verified that this copy is the same format name, same format,
same everything.  How can I debug this error further?  I have used
debugging, and the file that is open before the CHAIN is the correct
file, the fields used to CHAIN are valid, and nothing looks wrong, but
the CHAIN fails.  HELP!


-- 
"Enter any 11-digit prime number to continue..."

As an Amazon Associate we earn from qualifying purchases.

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