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



James,

Even if the exception didn't stop you I suspect you'll find the Library of
the Open Feedback to be blanks as the file open failed (it was in my quick
test case with a monitor around the Open). When the level check exception
occurs you should find CPF4131 in your job log. Receive the message and then
examine the library (message replacement variable 3).
On Wed, Jan 20, 2010 at 11:28 AM, James H. H. Lampert <
jamesl@xxxxxxxxxxxxxxxxx> wrote:

We have a situation in which an RPG program is checking the library on
an open file, to make sure it's open in the right library. If it isn't,
it closes out the "wrong" instance of the file, shells out commands to
remove the "wrong" library from the *LIBL and add the "right" one, then
reopens the file in the "right" library.

In short, to pseudocode, with LibraryWeGot derived from open feedback on
a file:

WHILE LibraryWeWant <> LibraryWeGot
close all the files
shell out "RMVLIBLE " + LibraryWeGot
shell out "ADDLIBLE " + LibraryWeWant + "*LAST"
reopen all the files

(And EXTFILE clauses on the F-specs are not an option here, for reasons
I'd rather not go into.)

At any rate, I just discovered a loophole: if the file on which we're
getting the open feedback has a level check issue, the exception stops
us before we reach the block that checks to see if we're in the right
library.

Assuming I catch the exception, is there an easy way to find out what
"LibraryWeGot" is?

--
JHHL
--
This is the RPG programming on the IBM i / System i (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.