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?
Thanks, TomThis message has been edited. Last edited by: Kerry,
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.
September 12, 2010, 05:51 AM
Tony A
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!! ) 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.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
September 13, 2010, 12:03 PM
EWoerle
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