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] How to retrieve MRE HOLDDATA path?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to retrieve MRE HOLDDATA path?
 Login/Join
 
Platinum Member
posted
I am developing a procedure that picks up hold files created by different users in MRE. I am able to use GETUSER(USERID) to determine the user who is running this procedure. But I can't find a way to get the folder name of the HOLDDATA path of the user (we create private HOLDDATA folder for each user in user.prf profile). Is there a sys function like GETUSER can do this?

Thanks.

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


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
I don't know of a system function that provides that info, but perhaps you could use APP QUERY to list files within the folder.

APP MAP TEST1 "C:\IBI\SRV77\WFS"
APP QUERY TEST1 HOLD
TABLE FILE FOCAPPQ
PRINT
*
END


Documentation: Developing Reporting Applications > Managing Applications > Reports and Help


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
Platinum Member
posted Hide Post
Francis, thanks for your input.

The program does not know the HOLDDATA app name ("TEST1" in your example). Is there a way to retrieve the app name, or the physical folder name mapped to the app name? My ultimate goal is to get the physical folder name ("C:\IBI\serv77\wfs" in your example). It must be stored somewhere on the server, just don't know how to get it.


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
First, let's determine what
quote:
we create private HOLDDATA folder for each user in user.prf profile
means - you must know a higher-level directory...


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
Platinum Member
posted Hide Post
Hi,

My thoughts here --since the app folder created at run time will be part of the approot- you can user APP LIST and check for the naming pattern of the user specific APP folder.
Again it depends on the way the dynamic folder is being created --naming used and all.

thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Platinum Member
posted Hide Post
This could do with some cleaning up, but it may be what you're after.

It uses the TEMPPATH function.


-* Set up APP MAP for Users EDATEMP TS directory  * * * * * * * * * *
-SET &TMP_PATH = TEMPPATH(50,'A50') ;
-SET &TMP_PATH = TRUNCATE(&TMP_PATH);
-SET &TLEN = &TMP_PATH.LENGTH;
-SET &TFMT = 'A' | &TLEN ;
-SET &TMP_PATH1 = TRIM('T',&TMP_PATH ,&TLEN,'\',1,'&TFMT');
-SET &TMP_PATH = TRUNCATE(&TMP_PATH1) ;

APP MAP TMPAGENT &TMP_PATH
-RUN


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Virtuoso
posted Hide Post
As long as you know the name of a file that is in the directory, you can use FMI to get the physical file name. You can then strip out the name to get the actual directory name:
SQL FMI SET SYSFILES MASTER
TABLE FILE SYSFILES PRINT PHNAME
WHERE FILENAME EQ 'car';
ON TABLE HOLD AS TF
END 
-RUN
-READFILE TF
-TYPE FILE NAME IS &PHNAME  


"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
Expert
posted Hide Post
Just an enhancement:
SQL FMI SET SYSFILES MASTER
TABLE FILE SYSFILES PRINT PHNAME
WHERE RECORDLIMIT EQ 12
ON TABLE HOLD AS TF
END 
-RUN
-REPEAT ENDOFLOOP &LINES TIMES ;
-READ TF &PHNAME.A80.
-IF &PHNAME CONTAINS '&FindThis.EVAL' THEN GOTO DO_SOMETHING ELSE GOTO DO_NOTHING  ;
-DO_SOMETHING
-TYPE Doing Something ... FILE NAME IS &PHNAME
-GOTO ENDOFLOOP
-DO_NOTHING
-TYPE Doing Nothing ..... FILE NAME IS &PHNAME
-GOTO ENDOFLOOP
-ENDOFLOOP
-* Do more...
the "WHERE RECORDLIMIT EQ 12" is just there for test/demo.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Platinum Member
posted Hide Post
Sorry for the late feed back. I was occupied in other issues in the the past week.

Twanette's code work perfectly for me. It's interesting that I can't find TEMPPATH() from the webfocus help file. I am wondering how many other system functions I am still not aware of Smiler

I appreciate everyone's input. This is a solved case. Thanks!


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
The only documentation I've found that mentions TEMPPATH is the Stored Procedure Reference (v7.7.03), an interesting document, where among other things, you learn how to write a stored procedure in Dialogue Manager.


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
Platinum Member
posted Hide Post
quote:
Originally posted by Francis Mariani:
The only documentation I've found that mentions TEMPPATH is the Stored Procedure Reference (v7.7.03), an interesting document, where among other things, you learn how to write a stored procedure in Dialogue Manager.


Guess I have to update my help file library. Thanks Francis!


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 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] How to retrieve MRE HOLDDATA path?

Copyright © 1996-2020 Information Builders