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] Capturing the APP path

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Capturing the APP path
 Login/Join
 
Virtuoso
posted
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, 2005Report This Post
Expert
posted Hide Post
This is frustrating.


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



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
APP PREPENDPATH or APP APPENDPATH may be one solution.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Platinum Member
posted Hide Post
We have different profiles for development test users as opposed to non-test. These profiles contain statements like.....
APP MAP DEVSETT D:\DEV\SETTLEMENT
APP MAP DEVDCF D:\DEV\DCF
APP MAP DEVQMON D:\DEV\QMON
APP MAP DEVMAND D:\DEV\MANDATE
APP MAP DEVFCSE D:\DEV\FCSETT
APP MAP DEVMIR D:\DEV\MIREPS
APP MAP DEVARCS D:\DEV\ARCSREPS
-RUN

APP PREPENDPATH DEVSETT DEVDCF DEVQMON DEVMAND DEVFCSE DEVMIR DEVARCS

This ensures that the correct version of a program is made available to the correct users. Works well. EDASPROF has the standard path.


_______________________
*** WebFOCUS 8.1.05M ***
 
Posts: 196 | Location: London, UK | Registered: December 06, 2005Report This Post
Master
posted Hide Post
Cripes - If Jack and Waz have a problem it must be a challenge indeed...

Susannah? Tony? Wep? FocWizards all ?

Ram and Ian I think have misunderstood Jacks question.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
applause, Waz.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
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, 2003Report This Post
Expert
posted Hide Post
quote:
fexecution

OK, I love this word!

I wonder if someone at IBI will get upset over it?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I would have done something similar to that suggested by Waz.

Time for the thinking cap?

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
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, 2004Report This Post
Virtuoso
posted Hide Post
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, 2005Report This Post
Virtuoso
posted Hide Post
Waz --

I just had to change 8 to 7 in the SUBSTR (WF 8 change in layout?), and it works like a charm. Very sweet.

Thx
-Jack
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Jack - Are you complaining about gas (petrol) prices - or bragging that they are so low?

You're paying 81 cents a litre ... here it's around $1.30 and in Europe more or less twice as much .. Frowner


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Expert
posted Hide Post
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, 2004Report This Post
Virtuoso
posted Hide Post
@Tony -

Yes, no MR ("Content folders") involved in this project.

Not to say that all my ideas are ideal.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by George Patton:
Jack - Are you complaining about gas (petrol) prices - or bragging that they are so low?


Surprised how low it's dropped Big Grin


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Send some down this way....


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
TABLE FILE _EDAHOME/CATALOG/SYSAPPS
SUM MAX.APPFULL BY APPFULL
END  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
<FreSte>
posted
Alan,

Thanks a lot for emphasising the difference when running this
fex from the server or from DevStudio.

This is exactly what I was looking for. Good One


Cheers

-Fred-
 
Report This Post
Virtuoso
posted Hide Post
Thanks all.

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, 2005Report 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] Capturing the APP path

Copyright © 1996-2020 Information Builders