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     [CLOSED]Getting the full path of a FEX file from reporting server.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Getting the full path of a FEX file from reporting server.
 Login/Join
 
Master
posted
I've created a generic logger. this logger captures the path of the calling fex, but it only works if the caller is on the client side, even though the logger.fex is on the reporting server.

In logger I use &IBIMR_fullpath to get the path of the fex, but this is empty if the calling fex is on the reporting server. Anyone tell me how to capture the path for a reporting server fex file?

This message has been edited. Last edited by: <Emily McAllister>,



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Gavin, if &IBIMR_fullpath is blank, then the fex exists on the reporting server or is an adhoc fex. If &FOCFEXNAME is equal to 'ADHOCRQ' then it's an adhoc request. For reporting server fexes, a combination of &APPROOT (or &APPPRIV, whatever that is) and &FOCFEXNAME should provide the full path (though you have to append '.fex'). Unfortunately, one parameter uses slashes, the other back slashes. Meanwhile, we have two reporting servers in a cluster - the code must be on both servers, so we would have to include the server name, which I don't know how to do.


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
Master
posted Hide Post
I can't use APPROOT as that isn't setup in our linux version in PROD. Plus, when I use it in Dev, I get this, which isn't what I'm looking for.
APPROOT = E:\Webfocus\ibi\apps;


&APPPRIV gives me the following:
A VALUE IS MISSING FOR: &APPPRIV


And FOCFEXNAME is ADHOCRQ.

What I'm attempting to do is get the APPLICATION Name of which the fex is running under, so I need the full path as it is on the report server/client side. Example, if the path is IBFS:/WFC/Repository/MyApplication/ I want really want "MyApplication", which I'm parsing out at the moment. If there is an easier way, client side AND reporting server, I'm all ears.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
Well, I thought I found an answer. Seems WebFOCUS has an internal DB, that keeps track of all these things.

Table Name: wf_reposobj
Has many columns, here are a few:
LASTACCESSON
LASTACCESSBY
PRT_PATH
OBJNAME

However, it doesn't capture Reporting Server access, only client side. Frowner No breaks.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
If you're not using approot, how are reporting server application folders defined?

I've not considered MyApplication in IBFS:/WFC/Repository/MyApplication/ to be an application, I thought it was just a folder in the repository.

We're on WF8.0.08 on Windows, so I imagine we have a different set of system variables.


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
Master
posted Hide Post
quote:
If you're not using approot, how are reporting server application folders defined?


Sorry, I got confused, thinking of the usage, "/approot/myapp/myfile.fex", we can't use that as it's not defined in our Linux environment. Your speaking about the &APPROOT, which is always there, but that doesn't tell me what application within that approot folder I'm currently executing from, which is what I'm looking for.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
My mistake - when I run the fex from Dev Studio, I get the proper App folder name:
&FOCFEXNAME   = baseapp/fml1


In our Windows environment, when I run a fex in a reporting server application folder, I get this:

&APPPRIV      = D:\ibi\apps80
&APPROOT      = D:\ibi\apps80
&FOCFEXNAME   = FML1
&FOCFOCEXEC   = _fml1

No app folder name Frowner.

I should never run anything from within Dev Studi - things behave quite differently.


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
There's some chatter here: Application Name Inside a FEX file

It appears to me pretty ridiculous that this isn't simple to do...

Code tweaked slightly since originally posted
-* Determine which application folder a fex resides in

-SET &ECHO=ALL;

-DEFAULT &FOCFEXNAME = 'NCRR004';

-SET &PROGRAM1 = LOCASE(&FOCFEXNAME.LENGTH, &FOCFEXNAME, 'A&FOCFEXNAME.LENGTH');
-SET &PROGRAM1 = TRUNCATE(&PROGRAM1);


SQL FMI SET SYSFILES FOCEXEC
-RUN

DEFINE FILE SYSFILES
FILENAME1/A64 = LOCASE(64, FILENAME, 'A64');
END
-RUN

TABLE FILE SYSFILES
PRINT
PHNAME
WHERE FILENAME1 EQ '&PROGRAM1';
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

-READ H001 &PHNAME.A80.

-TYPE PROGRAM LOCATION: &PHNAME

This message has been edited. Last edited by: Francis Mariani,


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
Master
posted Hide Post
Well, I made the same mistake and found a crazy discovery.. I was running the fex from appstudio, which means I never got what I was looking for. Then I ran it from the console, but via reporting server and it came back with just the name without the extension. Now get this.

If I'm in a fex that is doing an include on the logger fex, the &FOCFEXNAME has the FULL path and the extension of the calling fex, which is what I'm looking for.

I'm having one of those:

Welcome To FOCUS moments.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
The two top fexes sit on the reporting server. Ran from the console, under the report server tree.

Logger.fex
-DEFAULTH &INFO = _FOC_NULL;
-DEFAULTH &CURRENTPATH = _FOC_NULL;
-DEFAULTH &FOCFEXNAME = _FOC_NULL;
-SET &CURRENTPATH = IF &IBIMR_fullpath.LENGTH GT 1 THEN &IBIMR_fullpath ELSE &FOCFEXNAME;
-TYPE CURRENTPATH = &CURRENTPATH;
-TYPE INFO = &INFO;


Caller.fex:
-SET &INFO = 'This is my info and add variables to it, so we know what is being passed in.';
-INCLUDE cc/log/logger.fex


This on sits on the client side.
CallerFromClient.fex:
-SET &INFO = 'This is my info and add variables to it, so we know what is being passed in.';
-INCLUDE IBFS:/EDA/WFCL/cc/log/logger.fex



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
ok, take it all back, I saw a path and was too excited. &FOCFEXNAME is returning cc/log/logger.fex, no matter who the caller is from the reporting server. Being called from the content server, gives me the caller, since I'm doing an INCLUDE.

No consistency in this product.

This message has been edited. Last edited by: GavinL,



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report 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     [CLOSED]Getting the full path of a FEX file from reporting server.

Copyright © 1996-2020 Information Builders