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'm hoping someone can help me out with this. I started playing around with some sample code and ran into something I didn't understand. I am guessing that this is me missing some basics in regards to FOCUS and if so, any explanation would be helpful.
I cut down the code to just a simple case, but the idea is that I'd loop though some values and place them into variables. The intention is to reduce the number of lines in the code by creating those variables through a loop instead of explicitly defining them all.
Anyway, this code works. If I put a value in for the -SET &VAR1 value, it will be emptied. If I put a value in for -SET &VAR&i.EVAL, that will show up as output.
When I comment out the first line & run the code, I get prompted to enter a value for &VAR1. And this is the part that confuses me, as shown in the next code block.
So why does -TYPE &VAR1 only work when I explicitly set it to a blank space at the beginning, even though that step isn't necessary to create it?This message has been edited. Last edited by: bsullivan,
WebFOCUS 8.0.0.2 Windows, All Outputs
Posts: 27 | Location: Philadelphia, PA | Registered: January 21, 2013
Originally posted by Francis Mariani: You will be prompted if you have this code in a MRE fex with "Prompt for Parameters" checkbox checked.
Francis,
Thanks - That looks like it took care of it & it would explain my problems. It also seems like leaving the 'Prompt for Parameters' option unchecked gets ignored when you run from the code itself, which is interesting. But either way, that seems like it worked. Thanks again!
WebFOCUS 8.0.0.2 Windows, All Outputs
Posts: 27 | Location: Philadelphia, PA | Registered: January 21, 2013
The reason you are getting prompted is because of the .EVAL
.EVAL forces an immediate evaluation of an &var before the statement is even fully parsed or executed. Since you have not yet set a value for &VAR1, you are prompted.
The above will cause autoprompter to prompt for those values, because it's too retarded to see that those values are already set at that point. As I understand it, the autoprompting facility doesn't actually parse (or understand) the dialog manager code, it just looks for variables in the entire procedure and checks that there are -SET or -DEFAULT statements that provide a value for an exact match of those variables it found.
For extra fun, put in a -EXIT before the above block and auto-prompt will still attempt to find values for those variables even though that code is never reached!
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 :