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 am trying to create a dynamic WHERE COUNTRY EQ statement, and I am not getting quite the result I am looking for:
quote:
-* -SET &PARAMETER = 'ENGLAND'; -* -SET &ALPHA = 'WHERE'; -SET &BETA = 'COUNTRY'; -SET &COCO= 'EQ'; -SET &ZPARM = '''' || '&' | PARAMETER || ''''; -* -SET &NOQTS = &ALPHA||' '|&BETA||' '|&COCO||' '|&PARAMETER||';'; -TYPE &NOQTS -*EXIT -* TABLE FILE CAR PRINT CAR MODEL BODYTYPE BY COUNTRY &NOQTS END -RUN
Here is the error result:
quote:
TABLE FILE CAR PRINT CAR MODEL BODYTYPE BY COUNTRY WHERE COUNTRY EQ ENGLAND; END -RUN 0 ERROR AT OR NEAR LINE 20 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: ENGLAND BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
I need the WHERE statement to be: WHERE COUNTRY EQ 'ENGLAND';
Can anyone help me?
Thanks!This message has been edited. Last edited by: Kerry,
Note the .EVAL operator which is required to for immediate evaluation. Otherwise you get WHERE COUNTRY EQ '&PARAMETER';
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
------------------------------------------------------------------------------------------------- Blue Cross & Blue Shield of MS WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !!
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006
cheat use IF APP PATH IBISAMP TABLE FILE CAR PRINT * IF COUNTRY IS ENGLAND END .. so -SET &MYCOUNTRY = 'ENGLAND'; TABLE FILE CAR PRINT * IF COUNTRY IS &MYCOUNTRY END .. IF expects a constant, a value, eg a number or a character The parm alone won't work with 'W GERMANY' but you know that already but with single value paramters, (numbers or codes), this is the easy way.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
"&" appearing within quotes in the left hand side of a -SET statement is treated literally. As it stands, that -SET treats &PARAMETER as a constant, not a reference (so you'd wind up fishing for "&PARAMETER", not "ENGLAND").
You need to append .EVAL to make it work.
-SET &MYWHERE= 'WHERE COUNTRY EQ ''&PARAMETER.EVAL'';' ;
...
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Weird. But: Duh (on me). I knew that. I, sometimes, over use the ".EVAL" and forgot to include it here where it should be... But, it did work. The "WHERE COUNTRY EQ 'ENGLAND'" is the result of the "-SET &ECHO = ALL;"...Thanks Jack.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005