|
Buck and Barb both had great suggestions. I prefer the following: H Bnddir('QC2LE') * Execute Command (system) Subprocedure Variables D System PR 10I 0 ExtProc('system') D CmdText * Value Options(*String) D ErrorCPF S 7A Import('_EXCP_MSGID') D ErrorFlag S 10I 0 Inz(0) /free ErrorFlag=system('mycmd parm(' + parm + ')'); if ErrorFlag<>0; // process ErrorCPF; endif; /end-free Rob Berendt ================== A smart person learns from their mistakes, but a wise person learns from OTHER peoples mistakes. bmorris@ca.ibm.co m To: rpg400-l@midrange.com Sent by: cc: rpg400-l-admin@mi Fax to: drange.com Subject: Re: MONSMG in RPG program? (was (RE: QCMDEXEC help) 09/19/2001 12:12 PM Please respond to rpg400-l >From: "Wills, Mike N. (TC)" <MNWills@taylorcorp.com> >Date: Wed, 19 Sep 2001 11:37:39 -0500 > >Okay, next question. How do you monitor for messages when executing commands >when using QCMDEXC? Use an error indicator for CALL and check the indicator after, or use the (E) extender for CALL or CALLP and check %error after. The PSDS will have the failing message id, and the first 80 or so bytes of the error message. If you want to get more information about the message, you can receive the message with the QMHRCVM API, or by calling a CL program. Barbara Morris _______________________________________________ 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/cgi-bin/listinfo/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.