Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] STRREP
 Login/Join
 
Member
posted
Can anyone help me understand how to do a STRREP when I am trying to replace a single quote mark (')?

Thank you,

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.03
AS400 DB2 V5R4
Windows Server 2003 64 bit SP2, All Outputs
 
Posts: 4 | Registered: September 21, 2011Report This Post
Virtuoso
posted Hide Post
More background info about your need would be useful but hopefully the sample code below can give you some ideas:

DEFINE FILE CAR
NAME/A10 WITH CAR = 'O''Connor';
NEW_NAME/A10 = STRREP (10, NAME, 1, '''', 1, '*', 10,  NEW_NAME);
END
TABLE FILE CAR
PRINT NAME AND NEW_NAME
WHERE RECORDLIMIT EQ 1
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
Here is some more information. All of my data is right justified. I am trying to create a multiselect box with the values of A, B, C. But I need the fields to read ' A', ' B', ' C'. If I select A and B from my multiselect box the value is 'A' or 'B'. I need to modify this field to make it read like ' A' or ' B'.


WebFOCUS 7.7.03
AS400 DB2 V5R4
Windows Server 2003 64 bit SP2, All Outputs
 
Posts: 4 | Registered: September 21, 2011Report This Post
Expert
posted Hide Post
Why not have the values in the multi-select contain that first-character blank? The blank would be passed within the variable.

How are you populating the multiselect box? If it's with static values entered from the Composer, the line of code renders like this:

<OPTION selected value=" A" noinput="0" displaytext=" A">A</OPTION>

If you're populating it via a fex, it should work as well.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
MSmoger,

I have come up with this solution if you would like to give it a try:

-SET &NAME = ' ''A'' OR ''B'' OR ''C'' ';
-SET &NLEN = &NAME.LENGTH + 3;

-SET &NNME = STRREP ( &NAME.LENGTH, &NAME, 2, ' ''', 3, ' '' ', &NLEN.EVAL,  'A&NLEN.EVAL');

-TYPE &|NAME = &NAME
-TYPE &|NNME = &NNME


I set -SET &NAME = ' ''A'' OR ''B'' OR ''C'' ';
to have extra quotes around it for testing in the DS Editor.

If you have a string of A,B,C being passed it will most likely be like: 'A' OR 'B' OR 'C'.


WF 7.6.10, Windows, PDF, Excel
 
Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004Report This Post
Member
posted Hide Post
I will give this a try. Thank you.


WebFOCUS 7.7.03
AS400 DB2 V5R4
Windows Server 2003 64 bit SP2, All Outputs
 
Posts: 4 | Registered: September 21, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders