|
I have a small procedure that contains a local database file (dcl-f), input
only. It opens the file, setll and reade a subset of records by key, calls
a procedure for each record read, closes the file. Fabulous thing that
procedure-local file.
I thought I'd be slick you know, and use some newer (to me) compiler
features. I added this to the procedure:
on-exit;
if %open( inputfile );
close inputfile;
endif;
Now, the procedure no longer functions. The file gets opened, but as soon
as I setll, whammo I get MCH3601 returned from the setll operation.
I comment out the on-exit business, works slick as buttered glass again.
I checked that the correct file in the correct library has been opened and
it has the correct key and record format. NOTHING in the joblog but the
MCH3601 and that's not all that informative.
Anyone heard of any internal conflicts between "procedure-local" files and
the on-exit processing? Seems weird that I could have affected the ODP (or
it's internal tables) this way. I am on os version 7.2.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.