AnsweredAssumed Answered

Display error message in notification email content

Question asked by Revathi_Chelladurai_10523 on Mar 20, 2018
Latest reply on Mar 20, 2018 by Wolfgang_Brueckler_1288
I have a workflow with nearly 86 jobs and I have enabled email notification for any failures. It is working fine.
Now I'm working to enhance it further by displaying the error message in the email content itself.

I have coded it to some extent using PREP_PROCESS_REPORT, by defining start_marker and end_marker. Code snippet is attached.

But there are few shortcomings in the code:
1. &START_MARKER# is set to search for the pattern '*** Failure' when the error messages can be in different formats. Another error message: 

 *** Error 9134 Error: 2001 (86955c88-a071-4f9e-8bd4-000000000001) Exception thrown from communication channel : AcquireBufferTimed on a closed channe
 *** Exiting BTEQ...
 *** RC (return code) = 8

 Can we set the start_marker generic to identify any error messages? 

2. I need to display only the error message (in bold below), not any lines above or below it. 
 *** Failure 2646 No more spool space in {database}.
                Statement# 1, Info =0

 *** Exiting BTEQ...
 *** RC (return code) = 8

Can it be achieved by setting the end_marker as ' *** Exiting BTEQ...'? 

If this can't be done in UC4, can I redirect the error message to a separate file in unix and display the file contents in UC4 email content?

Thank you in advance for the help