Focal Point
Temporary Files

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5631000472

February 29, 2008, 05:28 PM
Noel
Temporary Files
We have a procedure that writes to a temporary file and wen need this file to be shared by several procedures. Now our problem is when there are several users that runs the process at the same time the temp file will be overriden. I hope somebody can give us an idea on how to save temp files into the specific users path or in other ways.

Again thanks in advance!
February 29, 2008, 06:10 PM
Darin Lee
if it goes anywhere except in the tempfile directory, it is no longer temporary and must be manually removed. You can use APP HOLD or FILEDEF to redirect files to specific directories. We use something similar, but you must be very careful doing things like this because 1)you eventually fill up disk space with thousands of files that never got cleaned up or 2)people are accessing other peoples files as you made reference to.

If you leave it in the tempdir, it is cleaned up after the request finishes and is NOT available for further use. You can SET TEMPERASE=OFF but please refer back to #1 and #2.

You can access the specific location of the tmepdir being used with -SET &PATH=TEMPPATH(255,'A255');


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 03, 2008, 09:06 AM
PBrightwell
If the file is unique to the user you can add &USER to the filename. Then the user will write over their own file when they re-run the program and will not write over anyone else's file.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
March 03, 2008, 09:08 AM
GinnyJakes
Noel,

Please update your profile signature with your product suite, platform, and release so that we can help you better. We are on Unix and have a scheme that our developers use to create a directory using the Unix process id in conjunction with another Unix command that makes the directory disappear in 30 minutes.

Knowing your platform would help us help you more easily.


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
March 03, 2008, 09:20 AM
Noel
quote:
&USER

Pat,

How am I going to create a unique file name to each user using the &USER variable?

I'm not that familiar with web focus, I just started using this product last Feb.

Noel


WebFocus 762 AS400 / DB2
March 04, 2008, 10:56 AM
ira
-SET &HLD = '_H1';
-SET &USERID = GETUSER('A8');
-SET &FILENM = &USERID ||&HLD ;
-TYPE &FILENM

THIS WILL ATTACH USERNAME + _H1 GIVING UNIQUENESS.

IRA
AIX 533 WF 5.3.8


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
March 04, 2008, 11:28 AM
PBrightwell
Thanks for answering that Ira.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes