Focal Point
Capturing error message

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/6367040816

March 19, 2012, 07:00 PM
Ramanathan
Capturing error message
Hi All,

Is there a way to capture error messages to a variable or is there any predefined error message variables in iWay data management console?


WebFOCUS 7.7, iWay Data Migrator, Windows
Excel, PDF, HTML
March 23, 2012, 11:26 AM
Kerry
Hi Ramanathan,

From our iWay people: The error code can be captured in &FOCERRNUM. Please try and see if it helps.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
March 23, 2012, 02:11 PM
Ramanathan
quote:
Originally posted by Kerry:
Hi Ramanathan,

From our iWay people: The error code can be captured in &FOCERRNUM. Please try and see if it helps.

Cheers,

Kerry


Hi Kerry,

Thanks for your reply.

I tried this already, it captures only the error number and not the error description.

Please let me know how to capture the whole error description.

Thanks

Ramanathan


WebFOCUS 7.7, iWay Data Migrator, Windows
Excel, PDF, HTML
March 27, 2012, 12:38 PM
Clif
I can't think of any way to do that at run time, but after a data flow you submitted has completed you could retrieve the message(s) from the log. Change the WHERE condition as needed.

 
-DEFAULT &MSGCODE=''
-DEFAULT &MESSAGE=''
SQL
SELECT 
   T1.MSGCODE ,  
   T1.MESSAGE  
FROM 
   etllog T1  
 WHERE   
  T1.REQ_NAME = '&FLOW' AND 
  T1.MSGCODE = '(FOC'  || CHAR(&ERRNUM )  || ')'  ;
TABLE
 ON TABLE HOLD AS MESSAGES FORMAT ALPHA
END
-RUN
-REPEAT :LOOP &LINES TIMES
-READFILE MESSAGES
-TYPE &MSGCODE &MESSAGE
-:LOOP
-CLOSE

May 02, 2012, 01:19 PM
jjoyce
Hi Ramanathan,

I found this thread as I was looking to do something similar in a DataMigrator job. I'm sending an email to my ticketing system when a DM job fails so that it will automattically create a work request and I wanted to include the error message in the body of the email.

I was able to make this work by setting a variable using the system function FEXERR, ie. &&ERRMSG = FEXERR(&RET_CODE,'A72').

Its not the full error description that you'd see with '? n' but better than just the error number.

Hope this helps!


WebFOCUS 7.7.2
Win2003
Excel, HTML, PDF