Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Diagnostic error messages

Status
Not open for further replies.

jack1955

Programmer
Nov 15, 2002
54
US
I coded the MONITOR and PSSR in my V5R2 RPG IV program so that I could detect and recover from a battery failure in a scanner device that emulates the 5250 stream. However, the error is diagnostic (CPF4410) and control is not returned to the RPG program and my recovery code is not executed. My goal is to restore contents of data in several data files. Committment control is not an option.

My next step is to change the severity of the message in a copy of the QCPFMSG file to possibly force control back to the RPG program.

Any input would be appreciated.

Jack
 
Instead of changing the system's message file, create a neww message file and add CPF4410 to it with whatever severity you want, then use OVRMSGF before you call your program. Two reasons: A) other processes on the sytem may need that message the same as it always was, and B) when you upgrade, you won't lose the changes.

We have three error message files, SYSMSGF (production level), QCMSGF (QC testing), and DEVMSGF (development).

Our message program (SNDMSG) does the overrides for us:

Code:
PGM        PARM(&MSGID)                         
DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)       
MONMSG     MSGID(CPF0000)                       
OVRMSGF    MSGF(SYSMSGF) TOMSGF(ARQCOBJ/QCMSGF) 
OVRMSGF    MSGF(QCMSGF) TOMSGF(ARDEV/DEVMSGF)   
SNDPGMMSG  MSGID(&MSGID) MSGF(SYSMSGF)          
ENDPGM

So, when we're developing or testing, we always get the latest version of the message.


"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
Thanks. I thought I wrote that I was making a copy of QCPFMSG, but I guess I didn't.

Jack
 
I needed a cancel handler. Found it. Testing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top