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     Catching Focus errors

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Catching Focus errors
 Login/Join
 
<bigpgo>
posted
Hello all. I'm trying to prevent the report from running if I selected an invalid holiday file (file that isn't found). Otherwise, the report will run 'normally', but all the business day calculations will be wrong.

So I have:
SET HDAY = &myHolidayFile

Is there a way to detect the error and abort the report if the holiday file name isn't found?
((FOC1892) FILE NOT FOUND error). Thanks in advance.
 
Report This Post
Expert
posted Hide Post
Interesting.

Normally, this would trap a WebFOCUS error:

-SET &MYHOLIDAYFILE = 'BAD';
-SET &ECHO=ALL;

SET HDAY = &MYHOLIDAYFILE
-RUN

-IF &FOCERRNUM NE 0 GOTO FOCUS_ERROR;

-TYPE HOLIDAY FILE FOUND

-GOTO PROGRAM_END

-FOCUS_ERROR

-TYPE WEBFOCUS ERROR: &FOCERRNUM

-PROGRAM_END

Except, for this particulr request, &FOCERRNUM is 0 even though an error message is displayed.

Weird.


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
Virtuoso
posted Hide Post
SET HDAY=whatever
-RUN
-? SET HDAY &HDAY


will retrieve the new setting (in &HDAY). The value will remain unchanged (typically blank) if the SET HDAY command failed.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
and i would offer this way, if you're on a windows box
FILEDEF HOLIDAY DISK D:\IBI\APPS\FHOLIDAY.FTM (or .txt or whatever)
CMD STATE D:\IBI\APPS\FHOLIDAY.FTM
-RUN
-IF &RETCODE EQ 0 GOTO process ;
-* the return code is 0 when ok, not zero (-1 i think) when it fails, ie files doesn't exist
-TYPE HOLIDAY FILE ISN'T THERE FOLKS.
-GOTO EOJ ;
-process
TABLE FILE HOLIDAY...etc




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<bigpgo>
posted
Thank you all for replying. Yup, I was puzzled myself when FOCERRNUM was staying at 0. And unfortunately, we're running this on a unix box. However, j.g.'s approach worked for me.
So it looks like:
- ? SET varName &XYZ

pumps the value of varName into a new variable, &XYZ. Very cool. Thanks.
 
Report 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     Catching Focus errors

Copyright © 1996-2020 Information Builders