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.
-*[firstproc.fex]
APP HOLDDATA TEMPFILES
APP HOLDMETA TEMPFILES
SET HOLDATTR = ON
-SET &MYHOLDFILE = MYXMLHOLD;
TABLE FILE MYTABLE
PRINT THISFIELD THATFIELD THEOTHERFIELD
WHERE SOMEFIELD EQ SOMECONDITION;
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS &MYHOLDFILE FORMAT XML
END
-RUN
-* *** MYXMLHOLD has 2200 lines and &LINES = 2200 ***
-INCLUDE app/anotherproc.fex
-*[anotherproc.fex]
TABLE FILE &MYHOLDFILE
PRINT DST.THATFIELD
ON TABLE SAVE AS MYSAVEDVALS FORMAT TAB
END
-SET &MYCOUNTER = &LINES;
-* *** MYSAVEDVALS has 13 lines but &LINES is still = 2200 ***
-*Blah Blah Blah
Is there a way to 'reset' the &LINES variable so it is read by the second TABLE request? If I put a -RUN after the second TABLE request I get an error telling me a value is missing for &MYHOLDFILE.
Thanks,
DanThis message has been edited. Last edited by: Dan Pinault,
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
As Francis already said, you need the -RUN to get a new value in &LINES.
Perhaps you should FILEDEF &MYHOLDFILE instead?
FILEDEF MYHOLDFILE DISK '&MYHOLDFILE';
TABLE FILE MYTABLE
...
ON TABLE HOLD AS MYHOLDFILE FORMAT XML
END
-RUN
...
TABLE FILE MYHOLDFILE
...
END
-RUN
-SET &MYCOUNTER = &LINES;
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
APP HOLDDATA TEMPFILES
APP HOLDMETA TEMPFILES (These 3 lines are loaded into FOCSTACK
SET HOLDATTR = ON
-SET &MYHOLDFILE = MYXMLHOLD; (This is executed first)
TABLE FILE MYTABLE
PRINT THISFIELD THATFIELD THEOTHERFIELD
WHERE SOMEFIELD EQ SOMECONDITION; (This TABLE request is loaded into FOCSTACK)
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS &MYHOLDFILE FORMAT XML
END
-RUN (This executes the commands in FOCSTACK)
-* *** MYXMLHOLD has 2200 lines and &LINES = 2200 ***
-INCLUDE app/anotherproc.fex
-*[anotherproc.fex]
TABLE FILE &MYHOLDFILE
PRINT DST.THATFIELD (This TABLE request is loaded into FOCSTACK and not executed
ON TABLE SAVE AS MYSAVEDVALS FORMAT TAB until a -RUN is hit or the end of the procedure)
END
-SET &MYCOUNTER = &LINES; (This is executed after the -RUN above)
-* *** MYSAVEDVALS has 13 lines but &LINES is still = 2200 ***
-*Blah Blah Blah
The error you are getting does not make sense to me. The value of &MYHOLDFILE should still be there unless there is something else clearing it out.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Your explanation of the order of execution is great. I've always had a foggy notion in my mind of how the procedure would be executed and you have lifted some of that fog.
It looks like the issue is in the fact that I'm HOLDing the file as XML. If I change the HOLD format to FOCUS the rest of the procedure works as expected.
I was hoping to do double-duty with the HOLD file by using it for some FOCUS procedures and for some Flex Enable applications.
The easiest solution is just to HOLD the data in two different files.
Thanks everyone!
Dan
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007