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 have an include file someone else wrote that I'm trying to modify so that I can call it multiple times from within the same program. Its using a filedef append and my problem is that the second pass seems to sum the numbers with the first pass. So in otherwords, I set &BDGT_HOLD = TABLE1, include the file, and my budget on TABLE1 is 150. Then I set &BDGT_HOLD = TABLE2, include the file and my budget on TABLE2 should be 100, but instead I get 250.
I assume the second pass is appended to the first pass in BDGT_HLDX.FTM, and I would think I need to close or destroy the original file in some way, but I don't know how.
The include file looks something like this (I ommitted a few things):
FILEDEF BDGT_HLDX DISK BDGT_HLDX.FTM (APPEND
-SET &LOOP_CNT=0;
-REPEAT MONBDGT 12 TIMES;
-SET &LOOP_CNT = &LOOP_CNT + 1;
-SET &SAVEHOLD = IF &LOOP_CNT LE 11 THEN 'SAVE' ELSE 'HOLD';
DEFINE FILE BDGT_HOLDX
.... END
TABLE FILE BDGT_HOLDX
SUM
BUDGET
BY FMN
ON TABLE &SAVEHOLD AS BDGT_HLDX FORMAT ALPHA
END
-RUN
-*...put budget numbers into an XFOCUS file...
TABLE FILE BDGT_HLDX
SUM
BUDGET
BY FMN
ON TABLE HOLD AS &BDGT_HOLD FORMAT XFOCUS INDEX FMN
This message has been edited. Last edited by: Kerry,
Its appending to the file each time it loops. If I remove the append, then I only have 1 line in the file when I should have 12. So essentially I want it to loop 12 times, append a line each time. Clear the File. Loop 12 more and append 12 new lines.
Sounds like you have two loops but I only see one. Anyways you can use DOS commands in Webfocus. So you can do a DOS delete when you need to clear the file.
DOS DEL \\WF_SERVER\IBI\APPS\APP_FOLDER\BDGT_HLDX.FTM
there appears to me to have been some code tightening... As Ginny says, You may be able to get away with removing the APPEND altogether. but if you're re-executing the fex within the same fex/agent, this will work FILEDEF thing DISK thing FILEDEF thing DISK thing(APPEND seems to clear the existing filedef, and start over. FILEDEF thing CLEAR didn't seem to do anything. -CLOSE thing didn't seem to do anything either. hmm.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003