|
I think you are trying to mix and match a couple of different methods of error trapping. IMHO that is not what you want to do in this situation. Drop the MONITOR for this case. Add the E extender as in D/include yourlib/yourfile,MemberWithListOfStatusCodes C/FREE open (e) inputr; select; when not %error; exsr ChkData; when %status = FileAlreadyOpened; // skip it when %status = GeneralExplicitError; // Look up major/minor return codes EndSl; /END-FREE Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin Frank.Kolmann@revlon.com Sent by: rpg400-l-bounces@midrange.com 01/23/2003 09:11 PM Please respond to RPG programming on the AS400 / iSeries To: rpg400-l@midrange.com cc: Fax to: Subject: How does the RPG MONITOR operation code work We are on V5R1 and I cant get MONITOR to work. I saw references in the archives but I cant see an answer to my problem. Program CHKALPFLD is a MOD and uses procedures. INPUTR is a program described file overridden to a DBF. This is the code // Open the file MONITOR; OPEN INPUTR; If not %error; Exsr ChkData; Endif; ON-ERROR; ENDMON; I get these messages in the log, I expected MONITOR to suppress them. File AVM01V in library UAUBPCF with member *N not found. Error message CPF4102 appeared during OPEN. Error message CPF4102 appeared during OPEN (C G D F). C Error message CPF4102 appeared during OPEN (C G D F). C Application error. RNX1217 unmonitored by CHKALPFLD at statement 0000008500, instruction X'0000'. I have also put in a rudimentary PSSR to see if it works. CSR *PSSR BEGSR * CSR ENDSR The program still crashes, any suggestions. TIA Frank kolmann _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l or email: RPG400-L-request@midrange.com 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 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.