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.
Here's a question I found on another board that I found interesting - no responses to this guy yet - anyone here want to take a crack at it?
----------------------------------------------
Here is an other problem I am encountering.
I would like to use TSCOM3 to run Fex files (batch).
Here is my .bat file :
C:\ibi\srv71\wfs\bin\edastart -f myfile.t3i
Here is myfile.t3i :
%connect %begin EX MYFEX %end %disconnect %stop_server
My question is : How could my .bat file knows whether an error occured during "myfex" was running? Because I do not want to continue ".bat" execution if an error occured.
Thank you.
Prod: WebFOCUS 7.1.6 - on Win 2K3/Tomcat - MRE/BID/RCaster/VisDis and AS400 (JDEWorld)
Posts: 23 | Location: North Carolina | Registered: May 16, 2006
Ocean (how close are you to one?) there are serveral ways to check for error conditions wihtin your fex, depending on what you would consider an error. Generally, one would test for certain conditions, and branch to the end of the fex depending on the results. so..its can be fex determined. Things like: if you create an interim hold file test to see that there are not 0 lines. TABLE FILE CAR PRINT * END -RUN -IF &LINES EQ 0 GOTO EOJ ; where EOJ is a statement label at the end of the fex. then theres SET ERROROUT = ON/OFF which will bail if anything happens that focus would consider an error , even tho you the developer might not.
Interesting that you start your server for each exeuction, and don't just have it running all th time; I wonder how wide-spread that is? Anyone with ears on want to comment?
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
edastart –f (or –x) is not a server start it is equivalent to a session start.
The major difference between edastart –f (-x) and a connection to an existing agent is that with an existing agent connected via the web or ReportCaster or Data Migrator (they all may actually have to start the agent) is all of your processing is done in a sub-directory under edatemp and when your process finishes WebFocus/iWay cleans up after you. With edastart –t the process starts in the directory/sub-directory that you start it in or direct it to and it does not clean up after itself you must do it manually.
edastart –t is the nearest thing that you have to batch processing capabilities in WebFocus if you do not want to buy ReportCaster or Copy Manager/Data Migrator. Most of the processing that you can do with those tools can be done via various techniques using edastart –t.
It is not really an on-line tool however it can be of value for long running processes.
As an example, you have a situation where you must retrieve data from several different systems to combine in a particular month end report.
Each individual extract takes 30 minutes to return the data you need and you have 10 of them. That makes 5 hours to get your data + 30 seconds to format the output.
If I am using Data Migrator I can have it start 10 tasks in parallel and wait until I have the data from all of them before I continue to the output stage. Or when using a WebFocus request I can have it start 10 edastart –f sessions and wait for the data before completing.
It’s a mechanism used by a few but under used by many.
Anyway to give a method for error processing.
When you encounter an error as Susannah says skip to an error handling label
where the code is -QUIT FOCUS [n]
n being a numeric exit code that you assign
The %end , %disconnect and %stop_server prevent any WebFocus generated error from getting back to the operating system so the only real option that you have if you want the process to return the error to you is to parse the .t3o output for errors and then set a variable in the operating system.
The following is a simple example of a .bat file that could drive it.
SET T3IERROR=0 CALL C:\ibi\srv71\wfs\bin\edastart -f myfile.t3i
REM FIND ALL ERRORS
FIND /N "(FOC" myfile.t3o > t3o-1.err
REM Eliminate warnings and all other errors of no interest ie create file REM You may want to repeat this eliminating specific (FOC errors that you REM do not want treated as errors
FIND /V "WARNING" t3o-1.err > t3o-2.err
REM COUNT the number of errors
FIND /N /C "(FOC" t3o-2.err > t3o-3.err
REM SET an environment variable to the number of errors
FOR /F "tokens=2 delims=:" %%A IN (t3o-3.err) DO SET T3IERROR=%%A
REM do what ever processing you want to do depending on the error
ECHO ERROR LEVEL IS %T3IERROR%This message has been edited. Last edited by: <JG>,
JG or anyone...this narritive is very good at understanding EdaStart. I have searched thru all IBI documentation and can understand in my mind...what exactly .3ti and .Bat roles are - in generating a Batch File to kick off a Fex or procedure. I know a .3to file gets created....and even though I can get these things to work...I don't know if I need both. Can anyone explain exactly what these are doing and give an example?? The more I look the more confused I become....
Thanks.....
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
You need a .t3i You will always get a .t3o A .bat (windows / script in unix) allows pre and post processing and is optional.
That is, if you are using edastart –f.
edastart –x is a little different it does not require the .t3i, does not generate the .t3o and is much more restrictive in its capabilities.
For an example to be of real value, platform (for you win2k) and need are absolute. The Focus/WebFocus part you can do very well. It's the op sys part that intimidates. It always has been on any platform and it’s becoming worse on Microsoft because they insist on trying to hide more and more and try to insist that a command line interface does not exist.
It does not matter what Bill might insist, the Windows.anything command line system is still DOS. The vast majority of the old script (.bat file) functionality works the same way or better. Or in many cases can be replaced by FREE GNU utilities that mean you can effectively develop UNIX on windows. (grep, rm, sed, vi, etc.)