|
Well, just to make life interesting... I commented out all the changes I made and tried to resolve it by moving the message ID into a global variable. I STILL don't get an %error. The only thing I didn't return to the way it was, is the addition of fields to the error data structure in the sub-procedure, which I need in order to get the message ID. BTW, what I am attempting to do is create a save file. For testing purposes, I have already created a save file with the name of the file that I am attempting to create. The error does happen, and is logged (kinda - see below), but the %error doesn't turn on. Another interesting side issue is that the message returned in the error data structure is different (CPF7302) than the one in the job log (CPF5813). Further, CPF7302 doesn't show up in the log. Ain't THAT special...?? This is getting funner and funner... any ideas appreciated. Dave ------------------------------------------------- I have taken program CBX126 written by Carsten Flensburg (thank you, Carsten - WAY cool program) and modified it for Journal Retention purposes. In that program is a PrcCmds process with ExtPgm of QCAPCMD. Then there is a procedure PrcCmd which receives a command string and processes it with the PrcCmds process. (Please feel free to correct my terminology - this is somewhat new to me...) The PrcCmd procedure returns "-1" for an error. What I need is the actual error code, in ONE use of this procedure. So... I have changed the "PR" PrcCmd procedure to have TWO parameters, the second one being: D MSgIdRtn 7a Options(*NOPASS) I don't want to HAVE to pay any attention to the message ID except in the one case where I need to know the specific message ID. I also don't want to have to change the many other times this procedure is called. I have changed the "PI" PrcCmd to include the second parameter, AND have changed the ERRC0100 data structure to have all fields. That is, instead of just having BytPro, I have BytPro, BytAvl, MsgId and MsgDta. Now when I debug my program, the %Error IF statement shows no error, however ERRC0100 does show that there was an error, and MsgId contains the message ID that I am looking for. So, why does the CallP(e) not trigger the %Error any more? And second, and probably more important, what is the "correct" way to accomplish what I am trying to do? TIA, Dave 612-371-1163
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.