Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] re-using save file data
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] re-using save file data
 Login/Join
 
Master
posted
I have created a save file to store a collection of IDs that I will use later in
a report fex. I have been running a fex
coded like:

 TABLE FILE GETDATAFORINVALIDCKEYSFORACCESSGROUP
 PRINT
 DISTRIBUTIONID/P11
 VALIDATIONMESSAGE
 WHERE ACCESSGROUPID EQ 100;
 WHERE INCLUDEDESCENDANTS EQ 'true';
 BY DISTRIBUTIONID NOPRINT
 ON TABLE HOLD AS SAM036_1 FORMAT ALPHA
 END
 -RUN


0 NUMBER OF RECORDS IN TABLE= 11 LINES= 11

 TABLE FILE SAM036_1
 PRINT DISTRIBUTIONID
 ON TABLE SAVE AS DISTLIST
 -*ON TABLE HOLD AS DISTLIST
 END
 -RUN


without any problems. Now, the fex cannot find the temp data file containing the DISTRIBUTIONID.

The question I have is - from organization to organization - what is a tried and true way to be CERTAIN my fex can find the temp data file
containing the DISTRIBUTIONID?

Do I use filedef? Do I use App hold?

I recall from mainframe days that this is something you could do with filedef, but is there a more efficient way to do this in WebFOCUS? Confused

Thanks,
Tom

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 536 | Location: Baltimore, MD | Registered: July 06, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Tom,

If you put foccache\ in front of your save file name you should then be able to access that file throughout the remainder of your procedure.

Off the top of my head I don't recall the direction of the slash but I'm going with the backslash. You may need to modify that though.

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 394 | Location: St. Paul, MN | Registered: November 06, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
The very act of SAVING of HOLDING a file should infer that it has been filedef'd and therefore able to be accessed during the same agent run.

If you use Dan's idea of using FOCCACHE (note the pronunciation!! Wink) then you should find a temporary folder (within which is your file) in the folder EDATEMP\FOCCACHE, however to confirm, it is a forward slash that you need to use -
TABLE FILE CAR
  SUM RCOST
      DCOST
   BY COUNTRY
   BY CAR
   BY MODEL
ON TABLE SAVE AS FOCCACHE/MYHOLD
END
Will produce a file called MYFILE.FTM in \ibi\srv7n\wfs\edatemp\foccache. A subsequent run of the same fex (from withn Dev Studio) replaces the cached file with a new version.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
Tony is right, you can do this with FOCCACHE, but remember that FOCCACHE is temporary data. You can set how long that data will reside before it is wiped out, but it is only temporary. At our shop, we have setup the FOCCACHE to last for 4 hours or until the user that ran the file logs out. Another thing to note, is that FOCCACHE is not shareable between users. Only the person that ran the procedure will be able to see that hold file. This becomes very useful when needing to keep temporary information seperate between users but not so much if you want one person to generate it for other people. If you want to hold this file more permanently then replace the foccache directory with any other directory. ie. bitemp/sam036_1. This will store the file in a permanent directory. Its the same as using the APP HOLD commands.

As for file extensions, you can save it as an alpha file, but you have to remember to use APP FI to allocate the data to the master file when you want to issue a table file request against it. I find it much easier to use FORMAT FOCUS or XFOCUS because then I don't have to allocate any files.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] re-using save file data

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.