Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Error Handling

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Error Handling
 Login/Join
 
Platinum Member
posted
Is there any new documentation or tips/tricks on Error Handling? I searched but didnt see anything new.

I know how to display the error when it occurs but I also want to display the line number or let me know the TABLE FILE or HOLD FILE the error occured in.

Is this possible?

Thanks,
prodrigu

This message has been edited. Last edited by: <Kathryn Henning>,


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Expert
posted Hide Post
As far as I know, you can't get the line number.

I would suggest a workaround of setting a string at each error test detailing what is needed, e.g. line number and master or a description of what was being done at that step.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Waz,

I already have a -INLCUDE file to check for errors and no records return but I wanted to see if I can what line (which you said not possible) and display the current hold file the error occurred. I have this INCLUDE file after each HOLD file.

Do you have an example of error handling you can show me maybe you worked on before?

Right now we dont have error handling and I am trying to implement it since we are moving 3/4 of our reports to go against Netezza DB.

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Expert
posted Hide Post
I'm going to have to dig it out, I don't have it with me.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
You could put in something at the end of your fex like:
-SET &PROG = XXXXXXXX;
-RUN
EX &PROG
-RUN
-IF &FOCERRNUM NE 0 THEN GOTO EX_ERROR ;
-RUN

-COMPMSG

-TYPE ==================================================================
-TYPE &PROG : COMPLETED SUCCESSFULLY
-TYPE ==================================================================
-GOTO CONT_XX

-EX_ERROR
-TYPE *******************************************************************
-TYPE &PROG - A PROBLEM HAS OCCURRED
-TYPE FOCERRNUM = &FOCERRNUM RETCODE = &RETCODE
-TYPE *******************************************************************
DOS ECHO &PROG > ERROR.DAT
-CONT_XX
-EXIT


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
Platinum Member
posted Hide Post
To capture the error line and message in a file try:-

FILEDEF EMGFILE DISK EMGFILE.DAT
-RUN
SET EMGSRV=FILE
TABLE FILE CAR
PRINC CAR
END
-RUN


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Ian!!!

Waz, did you have a chance to dig it out or no. If not dont worry about it.

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Master
posted Hide Post
Ian,

quote:
SET EMGSRV=FILE

Is that a maintain command? I don't see any documentation on EMGSRV.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
The documentation for EMGSRV is in "WebFOCUS New Features 8.0.08" (80snf.pdf).

quote:

Capturing Event Routing for Specific FOCUS Error Conditions

You can now use the EMGSRV profile command to capture event routing for specific FOCUS
error conditions. The EDAPRINT/ON value enables you to use existing server event routing
facilities to create custom filters that trigger email alerts and/or procedure execution for enduser
events that would not normally be routed to the edaprint log.


Hmmm... The "FILE" option is not documented there.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Francis with the info...

I was wondering why it didnt work for me. I am currently using WF 7.7.03 and ive been pushing to upgrade to 8.0.

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Expert
posted Hide Post
Hi Prodrigu,


This is what we did in my last job.

This is in a common fex
-SET &_VALID_ERROR_NUMBERS = '0, 3218, 32456, 36220' ;


END

-RUN

-IF NOT &FOCERRNUM IN (&_VALID_ERROR_NUMBERS.EVAL) THEN GOTO RPT_FERR ;

.
.
.
.


-GOTO RPT_OK

-*******************************************************************************
-RPT_ER1

-SET &RPT_MSG ='Error Message 1';
-GOTO RPT_END
-*******************************************************************************
-RPT_ER2

-SET &RPT_MSG = 'Error Message 2' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_ER3

-SET &RPT_MSG = 'Error - ' | &ERR_MSG ;
-GOTO RPT_END
-*******************************************************************************
-RPT_FERR

-SET &RPT_MSG = 'Error - Focus Error Number '
-             | &FOCERRNUM | ' Encountered' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_ZERO_RECS

-INCLUDE ZERO_REC_HANDLER

-IF &FOCERRNUM GT 0 THEN GOTO RPT_FERR ;

-*******************************************************************************
-RPT_OK

-SET &RPT_MSG = 'Report Successful' ;

-RPT_END

-INCLUDE MESSAGE HANDLER



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Hi Prodrigu,
I used SET EMGSRV=FILE in 7.7.03 and it works fine - don't know about version 8 though.
Regards,
Ian


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Ian!!!!

I got it to work with the below code. All I needed to do it SET TEMPERASE=OFF.

  
SET TEMPERASE=OFF

-SET &TEMPPATH=TEMPPATH(80,'A80');
-TYPE &TEMPPATH

FILEDEF EMGFILE DISK EMGFILE.DAT
-RUN
SET EMGSRV=FILE
TABLE FILE CAR
PRINC CAR
END
-RUN



Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Platinum Member
posted Hide Post
Hi Prodrigu,
Instead of setting TEMPERASE=OFF, just FILEDEF the output file to a specific loaction.
ie. FILEDEF EMGFILE DISK C:\ibi\apps\data\EMGFILE.DAT
Regards,
Ian


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Error Handling

Copyright © 1996-2020 Information Builders