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 without success to perform an IF statement with some masking.
The masking works fine when used as part of a WHERE statement, but I am trying to avoid running the query at all if possible:
We have many reports that are named in the convention '_aa_bbbbbbb' that we want to query, but we have some name in the style '_aaaa_bbbbbb' that we do no want to run the query for.
My original query was
TABLE FILE TEST PRINT * WHERE REPORT IS '_$$_$*'; WHERE USER EQ 'MARK'; END -RUN
(There are actually many more WHERE statements but wanted to keep it simple for the example.)
What I would prefer to do is to check if the REPORT is even of the style that I want before running the query. So I have been trying:
-SET &REPORT = '_op_materials'; -IF &PROC NE '_$$_$*' THEN GOTO SKIP_QUERY;
However the mask '_$$_$*' does not match to the variable '_op_materials' like it correctly does in the Where statement.
Is this possible? Any thoughts?
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006
DEFINE FILE CAR
FLD1/A12=IF COUNTRY EQ 'ENGLAND' THEN '_aa_bbbbbbb' ELSE
IF COUNTRY EQ 'JAPAN' THEN '_aaaa_bbbbbb' ELSE 'ZZZZZZZZZZZZ';
END
TABLE FILE CAR
PRINT FLD1
BY COUNTRY
WHERE FLD1 IS '_$$_$*';
END
As for the dialogue manager example: We do not support MASKing in the conditional IF test. However, the following method may be of interest:
-SET &ECHO=OFF;
-*THIS IS A GOOD ONE
-SET &REPORT = '_op_materials';
-*THIS IS A BAD ONE
-*-SET &REPORT = 'op_materials';
-SET &MYTEST=EDIT(&REPORT,'9$$9');
-IF &MYTEST NE '__' THEN GOTO SKIP_QUERY;
-TYPE FOUND NEEDED __ , FOUND &MYTEST
-GOTO DONE
-SKIP_QUERY
-TYPE NOT FOUND NEEDED __ , FOUND &MYTEST
-DONE
-RUN
-EXIT
Hope this helps.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
Firstly, could you update you signature so we know what release you are using. Thanks.
According to the 7.1.n help files (I had to check ) both WHERE and IF should be acceptable with the mask you are using so I cannot identify why it is not functioning for you. I have got results using both within the CAR file and I even tried defining a new field called REPORT just to see if it baulked at a possible reserved word, but no, it worked fine.
Tested it against Oracle table as well with success.
What DBMS source are you using? WHat response are you getting? What error messages ..... etc.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks Kerry, I will give that method a try and let you know how I get on
Tony, how do I setup my signature - sorry to ask such what should be such a simple question, I have been through my profile settings and can't spot it !
We are running version 5.3.3 connecting to AS400, but soon to be upgraded to 7.1 (Or so I have been promised!)
I do not get any error message, it just does satisfy the IF statement. I think it is literally looking for what is contained in the brackets and not recognising it as a mask.
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006
If you go into your Profile...click Edit and go about half-way down the page...there's a place for Signature. Hopefully one day this will be a mandatory field to fill out so we can alway know what people are working on.
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
mark,you're going to like the new as400 interface for 7. and if you've applied the latest ptf from ibm, i'm surprised your 535 still works well. we had problems after the latest ptf (logicals were illogical)and had to go to 7. but i'll caution you to WAIT for the 7 version that has just been released, i think 761. because the first verion of 76 makes MFD's with ONLY the short field names; (assuming you're reading db2)...whereas old autosql gave you the option of both long and short field names, which made the masters more informative. The just-released version does in fact allow you both the long and short names, i have it on good authority from the BGH, but i would check carefully with your rep before upgrading. The interface is extremely, extremely cool. you will love it!
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003