|
Frank, You were close. Try it this way. // Open the file MONITOR; OPEN INPUTR; ON-ERROR 01216; EXSR OpenFileErrorSR; ENDMON; Exsr ChkData; Do not try to put error-monitoring code inside a MONITOR function. Let MONITOR trap the errors that you expect to occur and then recover from those errors. You could even use the %open() BIF like... OPEN INPUTR; IF %OPEN(INPUTR); EXSR CHKDATA; ENDIF; Thank you, Matt Tyler WinCo Foods, Inc mattt@wincofoods.com -----Original Message----- From: Frank.Kolmann@revlon.com [mailto:Frank.Kolmann@revlon.com] Sent: Thursday, January 23, 2003 19:12 To: rpg400-l@midrange.com 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-2025 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.