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.
Is there a way to gain programmatic access to the output of APP SHOWPATH?
I am trying to use the search order set up by EDASPROF to control which version of a fex file will be fetched by -INCLUDE
But I find that execution of a fex in a particular app folder (via "Run" in Dev Studio) magically prepends that folder to the app path that is set in edasprof.prf; I want to sense that situation and modify the app path to undo that magic.
So, is there a way to capture the app search list, so that I can feed the list to dialog manager or TABLE?This message has been edited. Last edited by: <Kathryn Henning>,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I found an elegant way to do this, but didn't document it.
The only othere suggestion is to use the Trace file technique.
-SET &TEMPPATH = TEMPPATH(80,'A80');
-SET &TSCOM = GETTOK(&TEMPPATH,80,-2,'/',8,'A8');
-SET &TRACEFL = &TEMPPATH || ('cmd_op.trc');
-*******************************************************************************
-* Set Commands To Set Tracing
SET TRACEOFF = ALL
SET TRACEON=R1H
SET TRACEUSER = ON
SET TRACEUSER = &TRACEFL
-RUN
APP SHOWPATH
-RUN
-RUN
-* The previous two -RUN's must be there for this to work.
SET TRACEOFF = ALL
SET TRACEUSER = OFF
-RUN
-*******************************************************************************
-* Allocate The Trace File
FILEDEF TRACEFIL DISK &TRACEFL
-RUN
-*******************************************************************************
-* Write out a master to read the TRACEFIL list
EX -LINES 4 EDAPUT MASTER,TRACEFIL,CV,FILE
FILENAME=TRACEFIL, SUFFIX=FIX,$
SEGNAME=TRACEFIL, $
FIELD=LINE ,ALIAS= ,A500 ,A500 ,$
-RUN
-*******************************************************************************
-* Process the trace file to get the results of the command.
DEFINE FILE TRACEFIL
Item3/A20 = GETTOK(LINE,500,3,' ',20,'A20') ;
MSG_Item/A493 = SUBSTR(500,GETTOK(LINE,500,2,'"',500,'A500'),8,500,493,'A493') ;
CMD_Flag/A1 = IF EDIT(MSG_Item,'9') EQ ':' THEN 'Y' ELSE 'N' ;
END
TABLE FILE TRACEFIL
PRINT
MSG_Item
WHERE Item3 EQ 'NGtrEvnt:'
-* ON TABLE HOLD AS TMP_CHCK
END
-RUN
Are you saying that running a procedure from Dev Studio overrides what you specify with APP PREPENDPATH in your fex? That would be a bit disturbing...
If not, APP PREPENDPATH seems to be the right solution to force a specific order under specific conditions. If that depends on who's using the report, then Ian's idea about user profiles looks like a good approach.
If you really need to find out the path: The server admin interface has a screen where you can alter the path search order. Obviously that requires that the code responsible for that screen must be able to obtain the current path somehow. That seems a good place to have a peek and see what code is underneath.
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 :
yes indeed, running a backend fex , regardless of how launched, always sets its own app at the front of the path set by the edasprof, [for the duration of the fexecution, of course]. Try it... go to some app that is not on path, and just do an APP SHOWPATH, and you'll see.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
If you use ? PATH instead of APP SHOWPATH you can get hold of what is the PREPENDPATH (or the app folder from which you are running the fex) and the actual full path (!) of the app folders in APP PATH.
You can still use Waz's base code but just exchange APP SHOWPATH for ? PATH.
Just depends on what you want out of it?
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, 2004
Sorry, I was detained elsewhere. Thanks for all the responses.
Yes, I discovered the hard way what Susannah already knew.
My scenario was, I have test scripts for running a bunch of reports with a variety of options, and supporting scaffolding (common code), all in a Test app folder, and the candidate code for move up the ladder towards production in a separate Prod folder. I put hooks in the main fex of each report (-INCLUDE preface.fex near the top, and -INCLUDE postscript.fex at bottom) with the intention of having do-nothing fex members of those names in the Prod folder, and Do-Something-Interesting instrumentation code in the copies in Test.
I figured I could toggle the APP PATH statement in edasprof, to alter the search path order, and hence toggle between instrumented and pristine production mode. But the scheme failed, because the script fexes to exercise the reports were located in Test, so Test always won.
I bit the bullet, and segregated the scripts in their own app folder, and all is well.
Now I have to figure out what Warren wrote.
-Jack, down in Richmond (where gas is $3.069/gal!)
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Currently equivalent to $2.30 a litre in the UK for unleaded and a little more for diesel.
@ Jack, are you only running stuff in the apps folders?
If you are running in content folders then you should be able to affect the APP PATH in the content folder properties (or even the focexecs).
I've done that on sites where they didn't have a separate UAT environment and I wanted to control what repositories UAT could access whilst allowing developers access to dev, uat, test and prod repositories. Of course in prod they could only access prod.
Achieved by using identical focexecs in relevant app folders as per your ideal.
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, 2004
Ah, dhagen, this does capture the path in effect at any one time. This is really good, and seemingly accurate. For a bit more detail:
TABLE FILE SYSAPPS
PRINT APPFULL AS 'Application Name'
APPLOC AS 'Location'
APPNEST AS 'Nested'
DIRPAR AS 'Parent'
APPPPRF AS 'Set in Profile'
BY APPNUMP AS 'Path Sequence'
WHERE APPNUMP GT 0
END
See the differences when run from Server and from Dev. Studio.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Allow me to guild the lily, by showing the folder description (APPDESC):
TABLE FILE _EDAHOME/CATALOG/SYSAPPS
PRINT APPFULL AS 'Application Name'
APPDESC AS 'Description'
APPLOC AS 'Location'
APPNEST AS 'Nested'
DIRPAR AS 'Parent'
APPPPRF AS 'Set in Profile'
BY APPNUMP AS 'Path Sequence'
WHERE APPNUMP GT 0;
END
What is the source for APPDESC? The first line of profile.fex, in the respective APP folder. For example, baseapp\profile.fex starts with
-*FEX_DESCRIPTION=Default Directory: Files Always Available
, so "Default Directory: Files Always Available" is the reported value for the BASEAPP folder.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005