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     Capture Current APP Directory Name into a Variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Capture Current APP Directory Name into a Variable
 Login/Join
 
Member
posted
Is there a way to capture the first directory identified from an APP SHOWPATH command into a variable for use in Dialogue Manager?
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
David,

From IBI: Listing an Application

Here is an example:

  
APP LIST HOLD
-RUN
TABLE FILE FOCAPPL
PRINT APPNAME
  ON TABLE HOLD AS APPNAME FORMAT ALPHA
END
-RUN
-SET &ECHO=ALL;
-SET &CNTR = 1;
-REPEAT GET_APPS 9999 TIMES
-SET &APP_OUT = '&' | 'APP_' | &CNTR;
-READ APPNAME &APP_OUT.EVAL.A64.
-IF &IORETURN NE 0 GOTO APPS_OUT;
-SET &CNTR = &CNTR + 1;
-GET_APPS
-APPS_OUT
-? &
-EXIT


Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Tom - That gives me a list of all APP directories, but NOT in the order of the directories from the APP SHOWPATH command. I need to know the first directory from APP SHOWPATH to determine if I need to do an APP COPYF or not.
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
Mr. Denst,

IF you working under 7.6.5, the 1st directory will be FOCCACHE!!

You'll have to FILEDEF edasprof.prf under DISK:\ibi\DevStudio76\srv76\wfs\etc
and use GETTOK to get the 1st domain.

If you are doing an APP PREPENDPATH with a user profile, you'll have to ascertain the user,
FILEDEF the user.prf and do the same thing.

Unless someone else knows another way...

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
This code will put each App Name in a separate Dialogue Manager variable:

APP LIST HOLD
-RUN


-SET &CTR = 1;
-READ FOCAPPL NOCLOSE &ADATE.A10. &ATIME.A8. &APPNAME1.A45.

-REPEAT END_LOOP1 WHILE &IORETURN EQ 0;

-TYPE &APPNAME&CTR.EVAL
-SET &CTR = &CTR + 1;
-READ FOCAPPL NOCLOSE &ADATE.A10. &ATIME.A8. &APPNAME&CTR.EVAL.A45.

-END_LOOP1


Read up on "Controlling the APP Environment".


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
Francis,

If you read David's reply you will see that APP LIST doesn't give him what he requires - which is the result of APP SHOWPATH.

David,

Within a Tech Support search, I did come across a function called USERPATH, but am not sure that it a) works or b) gives what you need. However, the code was -

-SET &variable = USERPATH(256,'A256');

I've not been able to get it working (rel 7.6.2 servers) but the tech doc was as a result of a case. Search Tech Support with USERPATH and it's about the second one that shows (for me anyway).

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
Sorry!


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
Tried Tony's suggestion in 7.6.5, along with FGETENV - Both return blanks...
Tried in MRE and WRS...

From IBI:

 
How can you copy files to specific locations in a procedure? 
Case: 40452515 Product: WebFOCUS Release: 761 Primary OS: UNIX Date: 08/03/18 
Case information refers to the Product, Release, and OS for which this question was asked. The solution may apply to other Products, Releases, and Operating Systems.

Problem: 
How can you copy files to specific locations in a procedure?
Solution: 
In order to capture the location:
 
FGETENV to get the path at runtime, like this:
 
-SET &EDAPATH='                                       ';
-SET &EDAPATH=FGETENV(7,'EDAPATH',40,&EDAPATH);
-TYPE &EDAPATH is edapath
 
or

-SET &INIPATH = USERPATH (256,'A256');
-TYPE &INIPATH
 


 


Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
I did look at USERPATH before posting this thread. Let me ask the question a different way: Is there a way to capture in a Dialogue Manager variable the APP directory the procedure you are executing? I know about &FOCFEXNAME, &FOCINCLUDE, APP SHOWPATH, and WHENCE, but there doesn't seem to be a way to find the APP directory through Dialogue Manager.
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Member
posted Hide Post
OK - I should be able to use:

-SET &INIPATH = USERPATH(256,'A256');
-TYPE &INIPATH

The respose I got was:

C:\ibi\apps\xxx_testdir;C:\ibi\apps\crs210_dataC:\ibi\apps\ibisampC:\ibi\apps\baseapp

I can use GETTOK to parse up to the semicolon and capture the APP directory from there. I need to know the APP folder the procedure is running from to execute an APP COPYF command. Thanks for your help.

-Dave
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
Hey Dave,

Quick question:

What if the fex is in the 4th folder?

I "think" you may also need all the above with:

APP QUERY appname1 appname2 appname3 appname4 HOLD

Then query the HOLD file, which is called FOCAPPQ, and table out the row with the fex name. That will give you app folder.

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
David,

This is a posting in a thread from last year. It shows you a convoluted way to find the app folder of the program being executed. It appears to be the only way so far...


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
Francis,

EXCELLENT, Thanks.

I "always" forget about SYSFILES. I tried it, had to use GETTOK with '\' to get the actual APP out of the entire path, BUT, works great!!!

Again, Thanks!!!

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Tom -

I am only running this procedure through Developer Studio. So it will always be in the first APPS directory.

It would be nice to have a HOLD option for the WHENCE command though...

-Dave
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Member
posted Hide Post
Francis,

Thanks for the information. This is helpful for other situations I can think of.

-Dave
 
Posts: 8 | Location: Information Builders Chicago Branch | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
I have one concern with the using SYSFILES and APP COPYF, if the App directory is mapped, it may not work.


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: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     Capture Current APP Directory Name into a Variable

Copyright © 1996-2020 Information Builders