420 pts.
 Recieving a diagnostic message in program
hi

i want to recieve message text of diagostic message that encounters in program .I want it in a variable so that i can write it into a error log file .Please suggest a way to trap them and to have the text.

i tried using RCVMSG but it dint wor out.

 

thanks



Software/Hardware used:
as400
ASKED: September 3, 2010  6:32 PM
UPDATED: September 3, 2010  9:59 PM

Answer Wiki:
MoniTor : : : On-Error do_something : : End-Monitor -Sarge ========================================================= <i>i tried using RCVMSG but it dint wor out.</i> RCVMSG is a correct way to do it in CL. If it didn't work out, then you need to show us what you did so we can determine what was wrong. If you are working in a language such as RPG, the correct method would be to use the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/QMHRCVPM.htm">Receive Program Message (QMHRCVPM) API</a>. The API can also be used in CL, but the RCVMSG command might be easier to use. Tom
Last Wiki Answer Submitted:  September 3, 2010  9:59 pm  by  Rudedog   950 pts.
All Answer Wiki Contributors:  Rudedog   950 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _