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] Asynchronous handling of server procedures: How to catch errors?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Asynchronous handling of server procedures: How to catch errors?
 Login/Join
 
Virtuoso
posted
I'm playing around with EX CMASAP, but I have a few questions.

Say, I have these procedures:
wrapper.fex:
-SET &ECHO = ON;
-TYPE Start of wrapper procedure

EX CMASAP REQ_NAME=wrapper_error, APPDIR=baseapp, CM_SETERR=ON, CM_ASYNC=OFF
-RUN

-TYPE End of wrapper procedure: &RETCODE


wrapper_error.fex:
TABLE FILE CART
PRINT CAR
BY COUNTRY
END
-RUN


You may have noticed the error in the2nd script. That's on purpose, as I am looking for a method to detect errors in the inner fex.

The kicker is, I don't want to rely on anything custom-made in the inner fex (wrapper_error).

I notice that generated flows use global variables, such as &&CM__RETURN, but I want my wrapper procedure to be fail-safe enough that even unexpected errors in wrapper_error get flagged.
I get the impression that &&CM_RETURN instead relies on setting it from within the wrapper_error fex?

Next, I would prefer to run this procedure asynchronously, BUT I do need some processing when the wrapped procedure completes.
Is that possible? Is there, for example, some kind of trigger or event that can be fired (with some context information from the wrapper fex) when wrapper_error completes?

The end goal is to wrap our ETL procedures in a parameterised fex that also logs (among other things) start and finish times and the return code of the ETL procedure.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Hi Wep,

CMASAP is a DataMigrator process so you might be better off (a more knowledgable audience?) asking on the iWay Forum?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Hi Wep,

This has been bugging me as I am sure that you should be able to capture it!

Try something like this in your wrapper.fex
-SET &ECHO = ON;
-DEFAULTH &&DEP_1_RC
-TYPE Start of wrapper procedure

EX CMASAP REQ_NAME=wrapper_error, APPDIR=baseapp, CM_SETERR=ON, CM_ASYNC=OFF, DEP_ALIAS=DEP_1
-RUN

-TYPE End of wrapper procedure: &&DEP_1_RC


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Oh, indeed! That returns 8 for my faulty procedure and 0 for a proper one!
Good One

Now I wonder what RC=8 means... It's clearly not "FOC008: THE NUMBER OF IN-GROUPS-OF/IN-RANGES-OF FIELDS EXCEEDS 128", as I don't have any of those.

Perhaps it is this (DSTRUNER)?: https://infocenter.information...m#dAArcapiweb1037438

But even if it is... HTTP post error?!? I don't think so.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
If memory serves, the RC is the &RETCODE from the REQ_NAME procedure. So, as an error during parsing of the procedure would return 8, this is what your RC=8 is inferring?

I'm sure Danny or Waz etc. will correct me if I'm remembering incorrectly Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Asynchronous handling of server procedures: How to catch errors?

Copyright © 1996-2020 Information Builders