|
Hi Everyone, I posted this to Midrange-L and got no response, possibly because it was accidentally in HTML format, for which I apologize. Hopefully someone on this list can give me some insight. I'm getting a little confused from RTM re exception vs function check and how error handling occurs when mixing OPM and ILE RPG programs. A particular vendor's menu program was originally written in RPG, and was recently converted to ILE RPG. It allows the user to enter commands using either native syntax or Sys/38 syntax. When executing a menu option, the way they determine which is which is to assume it is AS/400 syntax and call QCMDEXC passing the command, with an indicator on the CALL. If it fails, they try again with QCAEXEC. If that fails, the user is notified. With ILE RPG, this method fails. The particular menu option in question happened to be a CHGDTA command. Yes, DFU. Even better (<G>) it was a Sys38 DFU. So the initial call to QCMDEXC shows an *ESCAPE message in the job log from CHGDTA saying the DFU program specified is not a DFU program (understandable), but then returns without setting on the error indicator, so no call to QCAEXEC is ever made. Compiling the menu program in ACTGRP(*CALLER) or DFTACTGRP(*YES) makes no difference. After reading and re-reading the manual, it seems to get down to the difference between an exception (a *ESCAPE, *NOTIFY or *STATUS message sent to the call stack entry as the result of a runtime error) and a function check (an exception message that is not handled by any call stack entry back to a control boundary or OPM). Both QCMDEXC and QDZCMDP (the CPP for CHGDTA) are OPM programs. Based on all that, it appears either QDZCMDP or QCMDEXC somehow "handled" the exception message so that it does not become a function check. So finally, my question is, what does "handling" the message consist of? And is there anyway to change this behavior to mimic the OPM behavior without modifying the menu program? TIA Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@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.