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 don't think you can remove the existence of a variable once its existence has been established with a set value. My approach for similar needs has been to -SET &var=''; which removes the value (well actually the value is supposedly a space with the &var.LENGTH=1. That means if I need to test that parm later I need to evaluate for the possibility of a space.
Blast those darn cockroaches!!
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
It means "does the variable exist". This could be useful when the variable may or may not have been passed from the launch form, or when created in a Dialogue Manager loop...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks for the explaination. I got the misconception that variables are loosely defined as long as they appear anywhere in the fex, you must supply values at the execution point, or the WF intepreter will choke. As for parameters passing to a fex, if more variables being passed, the fex ignores the extra ones and continue to run, but if fewer variables passed, then the fex will prompt for values of the the missing vars or defaults must be given inside the fex. That is why I thought &var.EXISTS is testing for value, not the variable itself.
Well, it's kind of the same thing. A variable cannot exist unless it has a value, whether it's a blank or zero or whatever, but it cannot be missing. It is initialized by a -DEFAULT, -SET, or -READ. The .EXISTS operator is just an easy binary way to check if a variable has been initialized without regard to what that value might be.
Here's one example of how I have used it. If you've ever used an indexed variable for multi-select controls, you know that if more than one value is passed, an &var0 is created containing the number of values selected and then &var1, &var2, etc. for the individual values. If only one value is passed, you only need to use &var. So I would evaluate &var0.EXIST to branch into a DM routine for evaluating multiple parameter values if it is 1 or just use the &var value if it is 0.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
-SET &ECHO=ALL;
TABLE FILE CAR
PRINT
COUNTRY
BY COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS H001
END
-RUN
-SET &N = &LINES;
-REPEAT END1 FOR &X FROM 1 TO &N STEP 1;
-READ H001 &COUNTRY.&X.A10.
-END1
-? &COUNTRY
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server