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     [CLOSED] Error Handling in Maintain when using EXEC

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Error Handling in Maintain when using EXEC
 Login/Join
 
Gold member
posted
Hello,

Is there a way to capture errors thrown when executing a fex using the EXEC command in maintain?

My maintain syntax is:
EXEC Report1
FROM Param1
INTO ReturnStk;

In order to compile the maintain, Report1 has to exist. However, after the app had been compiled, Report1 got deleted.

When the EXEC statement was executed, I get the following error:

(FOC03828) From Server LOOPBACK ==> THE FOCEXEC PROCEDURE CANNOT BE FOU
Report1
(FOC03688) Run failed for called Procedure: Report1.
(FOC03692) Run-time Error : Internal error in EMstatementInvoke! Return code =
-7023, proc = Report1

I understand why the error occurred. The concern I have is the application session is ended abruptly and the message displayed does not make sense to my users. I would like to retu

I have tried checking ForError, but from what I have read this is for INCLUDE, UPDATE, DELETE, and REVISE statements. In my fex I can check for &FOCERRNUM and &RETCODE, but these are not valid in Maintain. I would like to return a message similar to "Unable to complete the requested task. Contact Application Administrator. (FOC3828)."

In other languages, I can use Try...Catch logic to catch exceptions and return formatted messages to the customer.

Any help is appreciated.

Thank you,
Deana

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


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report This Post
Master
posted Hide Post
Hi Deana
While I do not know if this is possible I will bring it to programming and see what they say. In the future, please post Maintain questions to the WebFOCUS / FOCUS Focal point board. Thanks!

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Master
posted Hide Post
Ok
The error messages are coming from the file in mnt010.err and mnt020 under /ibi/srvxx/home/etc

The error FOC03688 in mnt010.err, which is the Run failed for called Procedure: %1, can be changed to anything that you
want.

The error FOC3828 in mnt020.err is only From Server %1 ==> %2. The &1 is the server name and the &2 is the message generated from the server. I am not sure if you can change this message much as &2 is being passed in.

Please give it a try and let me know your results.

Mark Derwin
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Mark,
I apologize for posting to the incorrect Forum. I generally use the WebFOCUS/FOCUS Forum on Focal Point, so I am not sure what I did differently this time, but will be more careful in the future.
Thank you for your response.
I understand the message returned in the error. I also understand I can change the message to say something like 'A problem has occurred, please log out and try again.' This would at least notify the customer to close the browser and log back in and may be the best approach available. In my experience, the customer will ignore the message, press the backspace button, which takes them to the previous screen. Then they try to continue using the application. However, as soon as they try to call the maintain code for any reason, they get a message that says they are disconnected. I have had some customers do this repeatedly and then eventually call me extremely agitated.
When the application disconnects in this fashion, the user session remains hanging and takes up resources until the WF Server is restarted.
I would like to be able to 'catch' the error, return a customized message to the calling maintain that can be displayed in a text field on a form and, most importantly, prevent the application from being disconnected from the server. If the error occurred while executing a fex, I would be able to check for &FOCERRNUM and use -GOTO to control the remainder of the execution. I am looking (hoping) for a similar method in Maintain.
Deana


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report This Post
Master
posted Hide Post
Hi Deanna
All I can think of is to check to see if the file is there BEFORE we do the EXEC command. This is what I tried.

Let's say you are going to EXEC a procedure named REPORT1.

Compute filename1/a25 = 'REPORT1.FEX';
Exec Checker From filename1
If FOCMSG.MSG NE "File doesn't exist" then
EXEC REPORT1.FEX
ELSE TYPE "ERROR"

In Checker you have:
STATE &APPROOT/devtips/&1
-RUN

The STATE command returns either nothing or File doesn't exist. Here I am looking in C:\IBI\APPS\DEVTIPS for the file. You would have to set the path for the project and file on your server. In this way you won't perform the EXEC if the file doesn't exist.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Mark,
I appreciate your example. I have not been able to test this for this specific example. I have used the STATE command in other fexes though and understand how it works. Based on my understanding, I still run the risk of Checker.fex being renamed or deleted, and thus causing the maintain app to be disconnected.

I was hoping for a way to check if the file exists from within Maintain, but that does not appear to be an option at this time. Truthfully, I don't see this scenario occurring very often. I just created the error during my own development and testing and it made think about how to handle it better for the customer.

Thanks for you suggestions,
Deana


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report 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     [CLOSED] Error Handling in Maintain when using EXEC

Copyright © 1996-2020 Information Builders