*PRV is typically used to send the message back to the caller.
The bigger question is what do you want to do with the message or are you just noting it in the job log ?
If you want your caller to catch the error, you probably want to send the message as an *ESCAPE message. Use *DIAG to write to log or *COMP to indicate completion. Or just use plain old *INFO.
CPF9898 is my favorite although others may not agree :-)
Regards,
Richard Schoen
RJS Software Systems Inc.
Where Information Meets Innovation
Document Management, Workflow, Report Delivery, Forms and Business Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site:
http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT
----------------------------------------------------------------------
message: 1
date: Wed, 6 Nov 2013 11:14:24 -0500
from: Jeff Young <jyoung0950@xxxxxxxxx>
subject: Sending exception messages from a CPP back to the caller
All,
I has been ages since I have had to do this.
Do I just send the message to *PRV or *EXT?
Do I need a special message id or can I use the generic CPF9898?
Thanks,
--
Jeff Young
Sr. Programmer Analyst
As an Amazon Associate we earn from qualifying purchases.