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     Line numbers in fex files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Line numbers in fex files
 Login/Join
 
Gold member
posted
Hi all,

Is there a way to find out the line number (in run time) in a fex file ?

Like, for example

-TYPE LINENO = &LINENUMBER


Then it will display

LINENO = 275


I thought this would make debugging easier.

Thanks,
Shravan


7.7.03, Windows 7, SQL Server 2005
 
Posts: 92 | Location: Carmel, IN | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
Just some thoughts: It shows "AT OR NEAR LINE" when an error occurs. You can add -TYPE statement when coding...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Doug,

Errors don't always show line numbers, especially the ones you catch with &FOCERRNUM. It catches only the last error that occurred. For example, if an error is caused by unbalanced parenthesis, it also throws INCOMPLETE REQUEST STATEMENT error. And &FOCERRNUM catches the last error only (INCOMPLETE REQUEST STATEMENT), with no line numbers, which is not much of a help. That is the problem.

Thanks,
Shravan


7.7.03, Windows 7, SQL Server 2005
 
Posts: 92 | Location: Carmel, IN | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
Would you provide a simple expample. Check your seeting, such as "SET MSG = ON"...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Doug,

Currently I don't have any issues with any reports. I am trying to provide a user friendly message whenever an error occurs. For example if I have 10 hold files in a report. I am doing something like

-RUN
-SET &ErrorNumber = &FOCERRNUM;
-IF &FOCERRNUM GT 0 THEN GOTO ERROR ELSE GOTO NOERR;
-ERROR
-INCLUDE ERRORREPORT
-NOERR   


after every hold file so that I catch the error immediately after it happens. INCOMPLETE REQUEST STATEMENT error is thrown after most of the syntax errors. So, some times knowing the error description does not help much because it is not very specific (like INCOMPLETE REQUEST STATEMENT).So, if I know where exactly(line number) the problem is happening, debugging will be easy IF an error happens. That's the idea.

Thanks,
Shravan


7.7.03, Windows 7, SQL Server 2005
 
Posts: 92 | Location: Carmel, IN | Registered: May 09, 2008Report This Post
Expert
posted Hide Post
That's great that you're doing any Error handling (most / a lot of developers don't, everyone should) Kudos to You! Anyway, if you use the -SET &ECHO and ask the users to do a View Source AND send that to you for analysis, that should be all the users need to know, unless you want to display more info, then you can check what Francis has to say about it in his post (here) or search on "text focerrnum" for more posts.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
I haven't tried this in newer releases, but it used to be possible to capture error messages from a procedure to a file by doing this at the top of your procedure:

APP FILEDEF EMGFILE DISK EMGFILE.TXT
 or
APP FILEDEF EMGFILE DISK EMGFILE.TXT (APPEND

SET EMGSRV=FILE
-RUN

You could then search EMGFILE, either with -READ/-WRITE or a temp MASTER and TABLE FILE, and display appropriate messages.

To return error messages to standard output:

SET EMGSRV=ON


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
About this:
quote:
Errors don't always show line numbers, especially the ones you catch with &FOCERRNUM. It catches only the last error that occurred. For example, if an error is caused by unbalanced parenthesis, it also throws INCOMPLETE REQUEST STATEMENT error. And &FOCERRNUM catches the last error only (INCOMPLETE REQUEST STATEMENT), with no line numbers, which is not much of a help. That is the problem.


How often do you use the "-RUN"? The "Last Error" Should be the last error execution of the stack.

Consider doing a -SET &ErrorMessage = 'Something significant...' ; before and error checking of &FOCERRNUM and use that in you errormessage routine.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 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     Line numbers in fex files

Copyright © 1996-2020 Information Builders