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.
I am trying to read the values of a hold file into amper variables. When I tested the application I TABLE FILEd and just used ON TABLE HOLD FORMAT ALHPA to create the file. I then used -READ HOLD .... to read the values. I know need to name the hold file using an amper variable so that if several people run the report at once it does not get confused. This is when I get the above error.
I know hold with the following
ON TABLE HOLD AS Z_&CURUSER FORMAT ALPHA
and try and read the values with this
-READ Z_&CURUSER, NOCLOSE &COLNAME.A110.;
it says to check the filedef for the file but I thought that information would be in the master file that is created when the ALPHA HOLD file is made.
I have set the APP HOLD to the application and it is is the app path. Any help will be greatly recieved.
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
-READ is Dialog manager, while TABLE is a FOCUS command. That means that the TABLE will be executed AFTER the evaluation of the DM commands, unless there is a -RUN in betwwen them. So, After your TABLE request, but before teh -READ, add a -RUN.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I would suggest taking the APP HOLD out of your focexec and let the hold file be written to EDATEMP. Each user will have his/her own EDATEMP directory so will not step on each other.
The trick then is to FILEDEF the hold file created in the temp directory so that you can use it in a -READ.
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-SET &TEMPPATH = TEMPPATH(120,'A120');
-TYPE &TEMPPATH
-SET &HOLDNAME= &TEMPPATH || 'hold.ftm';
APP FI HOLD DISK &HOLDNAME
-RUN
-REPEAT ENDLOOP 5 TIMES
-READ HOLD &COUNTRY.A10.
-TYPE &COUNTRY
-ENDLOOP
This is just an example that you can tailor to your needs.
So in your professional opinion is it best not to use the APP HOLD statement and let WebFOCUS deal with deleting the hold files. I just a little dubious of things happening automatically. Does it happen instantly the application has run as we could have an issue with space.
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
I needed to save a file that would be used by other procedures.
I was testing and I needed to look at the hold file and master.
If you do not have an APP HOLD, all held files regardless of format are written to an area called EDATEMP set up by your WebFOCUS admin. All held files are immediately removed after the application has disconnected.
In your case, if you used APP HOLD and two people ran at the same time, one would clobber the other's hold file. Taking out APP HOLD forces the files to go into edatemp and each person has an individual area where the files go.
There are other techniques to do this but for your stated application the one I showed you is the easiest.
The way we currently work it is that there is an amper variable containing the user id and this is incorporated into the hold file name so they dont get confused.
Does the EDATEMP work if the fron end of the website is ASP.NET?
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
EDATEMP belongs to the reporting server piece, not the WebFOCUS client. It is always there regardless of what your front end is.
In this scenario, you don't have to put the userid in the hold name as it is temporary and will not be around after the application is finished running.
I shall bear all of that in mind. I've just started doing a final check of our apps to make sure everything is ok. If it means that I do not have to write code to delete files I'm all for it.
Thanks for your help
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007
Thefoz; If you use APPHOLD you will have to clean up the environment when done, using Ginny's technique is perfect; no cleanup nec. on ur end. Only if you want the files around for later use or debugging purposes would I invoke APP Hold.
Thanks Ira. I does seem to be the general consensus that it is best not to use the app hold in a live situation. I'm still quite new to the WebFOCUS package and I'm finding some things brilliant and other things frustrating. The project is nearly finished so I'll be back to VB soon.
Thanks again
DevStudio 7.6.1. SQL Server 2005
Posts: 31 | Location: Basingstoke - England | Registered: September 17, 2007