Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Batch calls for Focexecs
Go
New
Search
Notify
Tools
Reply
  
Batch calls for Focexecs
 Login/Join
 
Silver Member
posted
Does anyone know how to call a focexec from within a Win2K Batch procedure run on the Reporting Server?


Thanks.
 
Posts: 37 | Registered: April 14, 2003Reply With QuoteReport This Post
<John Osborn>
posted
Calling a FOCEXEC from a batch program requires you to call the WebFOCUS server directly or the WebFOCUS client directly. The WebFOCUS server is more consistent as installation options go, so here are a few hints for its use:

In your \ibi\srv52\wfs\bin directory you will find "edastart.bat". This allows you to start the server, run a "FOCUS" session and call programs with various flags. The flag you need for running batch (if your program does a HOLD or SAVE) is:

edastart -x fexname

Try edastart -? to get more options. I use edastart -t for testing. All the paths, etc. are as defined in your edasprof.prf

Put this call in a batch file and you're done!
 
Reply With QuoteReport This Post
<Charles Sule>
posted
You can write a small c or visual basic program that can be used to launch a focus RPC (fex). I wrote two, one uses http connections to webfocus and returns the resulting report in html - the other uses the API instead of http. This version returns the report as plain text.

The API code is based on the example code supplied with the eda client. The code currently processes SQL queries. All you have to do is to modify it to process RPC calls. The function you will need to get info on is EDARPC. There were only a few changes that needed to be made to make the thing work.

The exe file will have to accept parameters like, eda_server_name, id, password, fex_name, and a parameter string that will be passed into the fex.

We use this exe to launch RPCs from within other focus fexs and to launch RPCs from batch files and using the scheduler.

Good luck!
Charles in New Orleans
 
Reply With QuoteReport This Post
Member
posted Hide Post
Tred,

One other thing to understand w.r.t. John's suggestion of using the "edastart -x" option is that the command executed runs within its own dedicated tscom3 process. It does not connect to the WebFOCUS server via a normal client/server EDA connection, does not get managed by the server's Workspace Manager, and does not use one of the Reporting Server's tscom3 agent processes.

In fact the Reporting Server does not have to be running at all in order for you to use "edastart -x".

If you do use "edastart -x" you can also look at redirecting any error messages or output to a log file, e.g., "edastart -x EX CARINST >> carinst.log".

All the best,
 
Posts: 5 | Location: Melbourne, Australia | Registered: March 31, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Batch calls for Focexecs

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.