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 have a variable that has quotes around it, and it's necessary to remove said quotes from the variable. How would I do that? I've tried to use things like STRIP, but it doesn't seem to like the fact that I'm passing a variable into it instead of a field nameThis message has been edited. Last edited by: FP Mod Chuck,
Not clear : are you saying that you have a variable that contains quotes that you want to remove or that the variable is surrounded by quotes ?
If your variable has quotes around it such as below, remove it
-DEFAULTH &CNTRY = 'ENGLAND'
TABLE FILE CAR
SUM SEATS
BY CAR
WHERE COUNTRY EQ '&CNTRY';
END
-* Can be replaced by
TABLE FILE CAR
SUM SEATS
BY CAR
WHERE COUNTRY EQ &CNTRY.QUOTEDSTRING;
END
Below code is removing quotes from variable's content:
It seems that you already receive the variable content with quotes (this is an option within IB Composer) so, do add any in the where clause neither .QUOTEDSTRING Have your code as
-DEFAULTH &CNTRY = '''ENGLAND'''
TABLE FILE CAR
SUM SEATS
BY CAR
WHERE COUNTRY EQ &CNTRY;
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
IBI recommends using REPLACE instead of STRIP. If you run the code below, in the Function description for STRIP it says:
quote:
Removes a character from a string. Use REPLACE instead
TABLE FILE SYSSQLOP
BY CATEGORY
BY FUNCTION
BY FUNCTION_SYNTAX
BY FUNCTION_TYPE
BY FUNCTION_DESC
WHERE FUNCTION EQ 'STRIP' OR 'REPLACE' OR 'STRREP';
ON TABLE SET PAGE-NUM OFF
END
This message has been edited. Last edited by: Hallway,
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015