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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Trap fatal errors, not warnings

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Trap fatal errors, not warnings
 Login/Join
 
Platinum Member
posted
Hi all,
I know how to use the &focerrnum to send up a popup box for any error. My question is how do I ignore warnings and still trap 'fatal' errors?
i.e
quote:
(FOC757) WARNING. YOU REQUESTED PRINT * OR COUNT * FOR A MULTIPATH FILE
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18

Is there an allocated series of numbers that are 'just' warnings?

It would also be nice to trap the actual text from the error message and display that inthe popup, too. That would make troubleshooting easier.

This message has been edited. Last edited by: mpbMDE,


WebFOCUS 8.1.05 Windows 7, all output
 
Posts: 107 | Registered: February 18, 2011Report This Post
Expert
posted Hide Post
I would suggest that you check the error list for all warning errors.

Then you could do a decode agaist the list to determine the errors to trap.


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Code to retrieve the error message text:

-SET &ERR_MSG1 = IF &FOCERRNUM EQ 0 THEN '' ELSE FEXERR(&FOCERRNUM,'A100');


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! That's what I needed.)

Thanks, Waz...What I'm really asking is if anyone HAS that list of warning messages.

Marilyn


WebFOCUS 8.1.05 Windows 7, all output
 
Posts: 107 | Registered: February 18, 2011Report This Post
Expert
posted Hide Post
With Francis' sugestion its easy, just check the message for WARNING.


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<FreSte>
posted
I found an old case which gives you a list with all the messages/warnings. I tweaked it a little.
Hope this helps (this example prints the first 100 messages).

-Fred-

-SET &COUNTER= 0;

TABLE FILE SYSTABLE
HEADING
"Error Messages for FOCUS/WEBFOCUS -- Release <+0>&FOCREL "
" "
  PRINT
    NAME NOPRINT
      COMPUTE ERROR_NUMBER/I5 = ERROR_NUMBER + 1; NOPRINT
      COMPUTE MESSAGE/A72     = FEXERR(ERROR_NUMBER, 'A72'); AS ''
      COMPUTE WARNFLAG/I1     = IF MESSAGE CONTAINS 'WARNING' THEN 1 ELSE 0; NOPRINT
  BY TOTAL WARNFLAG NOPRINT PAGE-BREAK
  ON WARNFLAG SUBHEAD
  "Warnflag: <WARNFLAG"
  IF RECORDLIMIT EQ 1
  ON TABLE SET PAGE-NUM OFF
  ON TABLE NOTOTAL
  ON TABLE SET HTMLCSS ON
  ON TABLE SET LINES 99999
  ON TABLE SET STYLE *
  INCLUDE = ENDEFLT,$
    TYPE=DATA, COLOR=GREEN, WHEN=WARNFLAG EQ 1 ,$
  ENDSTYLE

-:NEXT_ERR
-SET &COUNTER = &COUNTER+ 1;
-IF &COUNTER GE 100 GOTO :END_OF_FEX;
MORE
FILE SYSTABLE
IF RECORDLIMIT EQ 1
-GOTO :NEXT_ERR
-:END_OF_FEX
END
 
Report This Post
Platinum Member
posted Hide Post
Thanks FreSte!
Could you post the include as well. I'm getting an error message: FOC3294) CANNOT OPEN INCLUDED STYLESHEET AT LINE 1: INCLUDE=ENDEFLT
BYPASSING TO END OF COMMAND
Thanks!!!


WebFOCUS 8.1.05 Windows 7, all output
 
Posts: 107 | Registered: February 18, 2011Report This Post
<FreSte>
posted
Sure, it's just a default stylesheet


type=report,
    color=rgb(66 70 73),
    font='Trebuchet MS',
    size=9,
    squeeze=on,
    grid=off,
$
type=pagenum,
    style=italic,
    size=6,
    justify=right,
$
type=tabheading,
    style=bold+italic,
    size=14,
    justify=center,
$
type=tabfooting,
    style=bold+italic,
    size=12,
    justify=center,
    border-top=heavy,
    border-top-color=rgb(52 55 58),
$
type=heading,
    style=bold,
    size=12,
    justify=center,
$
type=footing,
    style=bold,
    size=10,
    justify=center,
$
type=title,
    backcolor=rgb(102 102 102),
    color=rgb(255 255 255),
    style=-underline+bold,
$
type=data,
    backcolor=(rgb(255 255 255) rgb(235 235 240)),
$
type=acrosstitle,
    border-top=light,
    border-bottom=heavy,
    border-top-color=rgb(52 55 58),
    border-bottom-color=rgb(52 55 58),
    size=9,
    style=-underline+bold,
$
type=acrossvalue,
    backcolor=rgb(218 225 232),
    style=bold,
$
type=subhead,
    size=10,
    style=bold,border-top=heavy,
    border-bottom=light,
    border-top-color=rgb(52 55 58),
    border-bottom-color=rgb(52 55 58),
$
type=subfoot,
    size=10,
    style=bold,
    border-top=light,
    border-bottom=medium,
    border-top-color=rgb(52 55 58),
    border-bottom-color=rgb(52 55 58),
$
type=subtotal,
    backcolor=RGB(200 200 200),
    style=bold,
    border-top=light,
    border-top-color=rgb(66 70 73),
$
type=grandtotal,
    backcolor=rgb(66 70 73),
    color=rgb(255 255 255),
    style=bold,
    border-top=light,
    border-bottom=heavy,
    border-top-color=rgb(66 70 73),
    border-top-style=solid,
    border-bottom-style=double,
$
 
Report This Post
Platinum Member
posted Hide Post
One more Queston:
The error messages usually come in the format (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: filename
How can I capture the filename with the text? (or fieldname if that's the text after the message?
Thanks!


WebFOCUS 8.1.05 Windows 7, all output
 
Posts: 107 | Registered: February 18, 2011Report This Post
Expert
posted Hide Post
That's the $10,000 question!


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
Expert
posted Hide Post
There was a post that shows how to use tracing to capture the output, and then could be processed to get the actual displayed message.

Here is another way that may help.
SET EMGSRV=FILE
-RUN

TABLE FILE CAR
 PRINT *
 ON TABLE HOLD
END

-RUN

SET EMGSRV=ON

-RUN

-TYPE Contents of the EMGSRV to file.
! type emgfile.ftm


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] Trap fatal errors, not warnings

Copyright © 1996-2020 Information Builders