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.
With 8.2.06 I had no luck with LIKE but CONTAINS works just fine in a WHERE statement, but if I replicate your DEFINE I have the same issue as you neither LIKE or CONTAINS works. Better open a case with techsupport...This message has been edited. Last edited by: FP Mod Chuck,
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
This answer assumes the following: 1. FIELDA is an ALPHA field, because LIKE only works on text strings 2. That you are trying to get the ALPHA values that have the percent sign in it.
The percent sign in a LIKE statement is a wildcard. So the statement above is basically saying if the field has anything in it, then return the field. Also if you want MISSING values, you need to set MISSING=ON.
So to get fields with the percent sign, you need to escape the percent sign. Something like this
DEFINE FILE masterFileName
NEWFIELDNAME/A50V MISSING ON = IF FIELDA LIKE '%~%%' ESCAPE '~' THEN FIELDB ELSE MISSING.
END DEFINE
Originally posted by DWaybright: I get an error when I try that. InfoAssist doesn't seem to like ESCAPE. I tried using other characters in place of ~ and got the same error. :/
*SIGH* Yeah, sorry. I just noticed that. Once again IA saying perfectly valid code is invalid.
I'm trying one other thing of using a REGEX to see if there is a percent sign in the text. I'll post the answer if it works.
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015
DEFINE FILE ibisamp/car
Margin/D12.2%=(CAR.BODY.RETAIL_COST / CAR.BODY.DEALER_COST -1)*100;
FIELDA/A25=IF CAR.BODY.SEATS EQ 5 THEN TRIM_(BOTH, ' ', FTOA( CAR.BODY.SALES, '(D12M)', 'A25V')) ELSE TRIM_(BOTH, ' ',FTOA( Margin ,'(D12.2%)', 'A15'));
FIELDB/D12M=CAR.BODY.SALES ;
FIELDC/D12M MISSING ON=IF REGEX(FIELDA, '[%]') THEN FIELDB ELSE MISSING;
END
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=ON;
SET HTMLENCODE=&WF_HTMLENCODE
SET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT
-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
TABLE FILE ibisamp/car
SUM FIELDA
FIELDB
FIELDC
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
BY CAR.BODY.SEATS
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, $
ENDSTYLE
END
-RUN
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015