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     [SOLVED] Creating HOLD file to store results from loop

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Creating HOLD file to store results from loop
 Login/Join
 
Silver Member
posted
Good Morning,

I am iterating over a table of guids and preforming some business logic on each. When that's complete, depending on what happened during the business logic, I may push the guid to a results table. It looks like my best, (only?), option is to create a hold using filedef and -WRITE the guid to that file.

A couple Q's:


1. I came across some code which suggests the way to approach this is something like:

FILEDEF RESULTS DISK ????/results.ftm
-RUN

- begin my loop
- do my work

- if I want to write the guid
-WRITE RESULTS &GUID

- end of loop

Does that look right? Do I not need to define a mas file? If that is the right way to go about it I'm getting the following error so maybe I'm missing something?

(FOC339) DIALOGUE MANAGER -READ FAILED: CHECK FILEDEF OR ALLOCATION FOR: RESULTS


2. I learnt a little while ago that if I want my holds to be removed at the end of the request I don't want "ON TABLE HOLD AS 'foccache/temp_hold" but rather "ON TABLE HOLD AS temp_hold" as foccache is session, the other route is for the duration of the request, (feel free to correct me if I'm wrong about that). So with that in mind, where would I want to create this hold if I want it to be deleted at the end of the request? So in the below code, what should "????" be?

FILEDEF RESULTS DISK ????/results.ftm
-RUN

Thanks!

This message has been edited. Last edited by: FP Mod Chuck,


Windows 8203 All output formats
 
Posts: 47 | Registered: November 30, 2018Report This Post
Master
posted Hide Post
Hi Sean,

by default foccache is used ( session based storage )

so result.ftm and foccache/result.ftm should be the same.



I have similar code. But I don't use ( nor like :-) ) -WRITE

One of the things that can be done is APPEND.

FILEDEF HOLD DISK HOLD.FTM (APPEND

SET HOLDLIST = PRINTONLY


Then just hold what you need 'do your work'
this could be any dummy request.

begin loop

TABLE FILE CAR
SUM COMPUTE GUID/A255 = 'thisIsNotARealGuid';
BY  COUNTRY
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD FORMAT ALPHA
END


end loop

TABLE FILE HOLD
PRINT *
END



g'luck,


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
quote:
so result.ftm and foccache/result.ftm should be the same.

Monday morning brain freeze? result.ftm will go to the foctemp folder for the agent used and not the foccache folder for the user.

If you are only wishing to output certain records from your processing, then look at using PUTDDREC - document .

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
...eehm... yeah. But for this case the effect is the same I guess.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Silver Member
posted Hide Post
Works, thanks!


Windows 8203 All output formats
 
Posts: 47 | Registered: November 30, 2018Report 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     [SOLVED] Creating HOLD file to store results from loop

Copyright © 1996-2020 Information Builders