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     [SHARING] What is the best way to create user-based applications?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] What is the best way to create user-based applications?
 Login/Join
 
Guru
posted
I like to have user-based applications named with their userids mainly to hold temporary files created by running other applications.
When an application is launched, APP HOLD &userid is added,(if application &userid does not existed, can it be created on the fly?) and the relavant hold files names are refreshed, and will be referred by drill-downs & exec fexes.

It may sounds pretty basic, but WF is still very much a new toy to us. With 3 blind mice crawing around, we want to set some("best way") standard approaches for creating applications. Your sugguestions will be greatly appreciated.

Thanks,


Hua

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Expert
posted Hide Post
One way is to upgrade so that you can use FOCCACHE.

To create an application directory on the fly, you can use this syntax:
APP CREATE app1[, app2,...]

Another way is to create a directory with a process id and then arrange to have it deleted after a certain period of time. This is dependent on your operating system. You may not want these directories hanging out there forever.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Hi Ginny.

Thanks again for your help.

FOCCACHE seems to be good solution. 2 hours should give enough time for other fexes to share the held data. We are inching our way to upgrade...
I am curious to what happened if cache filea are expired - the application brought to halt or data will be regenerated?

How do I get the process id, in your 2nd sugguestion?

How do I trap the error on APP CREATE app1 when app1 is already existed?

Thanks,

Hua

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Expert
posted Hide Post
quote:
I am curious to what happened if cache filea are expired - the application brought to halt or data will be regenerated?

The FOCCACHE directory is in EDATEMP. It will disappear when the time is expired.
quote:
How do I get the process id, in your 2nd sugguestion?

You'll have to ask your Sys Admin. I only know how to get it in Unix. However, there is a function to get the name of your temporary directory and you could get the tscomid from that.
-SET &TEMPPATH = TEMPPATH(120,'A120');
-TYPE &TEMPPATH
The answer would be something like:
/WebFOCUS/ibi/srv76/wfs/edatemp/ts000624/
You could use that number to generate a directory name. However, you have to expire it as well and the other programs would have to know its name as well.

quote:
How do I trap the error on APP CREATE app1 when app1 is already existed?

I don't know. Generally ibi/apps is open to everyone to create apps or nothing would ever get done.

I think FOCCACHE is the way to go. But whatever you decide, get your sys admin involved as he/she might know of some operating system things you could do inside WebFOCUS.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Creating userID directories sounds like a maintenance nightmare to me. How will directories from cancelled userIDs be monitored and deleted? Production environments vary from organization to organization, but some proscribe the creation of new permanent application objects by user tasks. In a reporting environment, creation of permanent work files is normally seldom necessary. When necessary, such permanent files can often be created within the production work flow (via ReportCaster, etc.) instead of by individual users. And as Ginny suggests, temporary work areas like FOCCACHE or TEMPPATH can be used to isolate user tasks that might step on each other when run concurrently.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Guru
posted Hide Post
quote:
Creating userID directories sounds like a maintenance nightmare to me.

That goes to show how much I understand the WF environment. Am I glad to ask the question! Thanks to your advice, Dan.
I am working toward the TEMPATH thingy. Having trouble designing fex where I want to refer to the temporary file created by another fex?! Can't seem to locate the file.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Expert
posted Hide Post
I run this code when I want to save the hold files:

-*== Determine Temp file path for Windows ==================

-SET &TEMP_PATH = FGETENV(4, 'TEMP', 200, 'A200');
-SET &FILE_PATH = &TEMP_PATH || '\' || &IBIC_user;
-SET &MKDIR_CMD = 'DOS mkdir ' | &FILE_PATH;

-*== Map the temporary Application folder to be used by files created with the HOLD command ===

-* Clear any previous APP MAP command for this app ===
APP MAP &IBIC_user
-RUN

APP MAP &IBIC_user &FILE_PATH
-RUN

-*== Create Save file directory ============================
&MKDIR_CMD
-RUN


In another fex, you include this code, but you also have to FILEDEF the files if they're non-FOCUS DB files:

FILEDEF R010H001 DISK &IBIC_user/r010h001.ftm


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
Don't store the files in the temppath directory. All the files will be deleted when the agent is disconnected. However, you could use the number to construct another directory. The problem is, as both Dan and I have stated, is deleting the directory after a certain amount of time. In Unix we can say:
!echo "rm -fr &DIR" | at now + 30 minutes
to delete the directory in 30 minutes.
Here is the code a lot of folks here used before FOCCACHE. Maybe your sys admin can convert the operating system commands (the ones that start with !) to the AS400 versions.
FILEDEF PID DISK pid.dat
!echo $$ > pid.dat
-DEFAULT &PID=10000
-DEFAULT &APP='work'
-RUN
-READ PID &PID
-RUN
-SET &DIR='/WebFOCUS/ibi/apps/work/FA_work/' || &APP || '_' || &PID;
-SET &&DIR='/WebFOCUS/ibi/apps/work/FA_work/' || &APP || '_' || &PID;
-SET &&WRKDIR='work/FA_work/' || &APP || '_' || &PID;
-RUN
!mkdir &DIR
-RUN
!echo "rm -fr &DIR" | at now + 30 minutes
-RUN


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
This is an example of using TEMPPATH:

-SET &TEMPPATH = TEMPPATH(255,'A255');
-SET &OUTFILE  = &TEMPPATH || 'HOLD1.ftm';
FILEDEF HOLD1 DISK &OUTFILE
-RUN
-*
TABLE FILE CAR
PRINT DST.COUNTRY
ON TABLE HOLD AS HOLD1
END
-*
TABLE FILE HOLD1
PRINT *
END


But, as Ginny states, TEMPPATH data is deleted when the user session ends. If you need persistence beyond the current user session, then you will need to use a permanent directory.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
And, if you don't have an APP HOLD in your program, the hold files go there automatically so you don't have to do all that extra stuff.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Thanks for all your sugguestions and codes. We just upgraded to IE8 last night and lots problems popped up that I need to take care right now. I'll be back to diguest your solutions.

Thanks a lot.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Expert
posted Hide Post
IE8 is not supported until 7.6.10. We are having an odd problem with DS for those folks who have bucked the corporate image and downloaded 8. They can't use an alias in Show Environments to access the web server and have to use the IP address. Therefore, I would recommend against it until you have 10 installed.

Plus, then you could use FOCCACHE! Win-win. Big Grin


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Ginny,

Sorry take so long to reply you and appreciated the warnings with IE8. We have the immediate problem that HTML Layout painter can not generate html codes for the OnClick Button, which prompt us the decision to upgrade. Hopefully it will be the win-win as you said.

We have no intention to upgrade MS Office to the latest the greatest(at least for now). We already experienced the limitations with excel 2000 at 7.6.4. Will the upgrade to 7.6.10 causing us grief?

Thanks everyone for the suggestions of using temp files. I may not have the luxury to test them out at this time.


Thanks again,



Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report 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     [SHARING] What is the best way to create user-based applications?

Copyright © 1996-2020 Information Builders