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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Replace an underscore by %20

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Replace an underscore by %20
 Login/Join
 
Gold member
posted
Hello,

I have link in a column. This link has lot of sblank spaces in it. The link works fine in the PDF and HTML output format of the report whereas it does not work properly in the excel sheet. I have replaced all these spaces with an underscore and now I want to replace these underscores with "%20". I know we can replace one character with another but not one character with a string.
Can somebody guide me.

This message has been edited. Last edited by: <Emily McAllister>,


Webfocus 8.1.0.5
Windows, all output
 
Posts: 56 | Registered: February 16, 2011Report This Post
Expert
posted Hide Post
quote:
I know we can replace one character with another but not one character with a string.

Really? Have you read the help file on STRREP?

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, 2004Report This Post
Gold member
posted Hide Post
Yes I read the article for STRREP but it says only one character will be replaced. In the example given for the STRREP they have replaced a special character $ with USD. But in my case I have to replace blank spaces with "%20" which is a combination of special character and alphabets.

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


Webfocus 8.1.0.5
Windows, all output
 
Posts: 56 | Registered: February 16, 2011Report This Post
Virtuoso
posted Hide Post
It's a combination of printable ASCII characters. There's nothing special about them. STRREP will do what you need.

It's easy to prove with a simple test case:
-SET &SAMPLE = 'STRREP will replace spaces with %20';
-SET &REPLACED = STRREP(40, &SAMPLE, 1, ' ', 3, '%20', 50, 'A50');

-TYPE "&SAMPLE" was replaced by "&REPLACED"

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
quote:
But in my case I have to replace blank spaces with "%20" which is a combination of special character and alphabets.

Did you try it though?

STRREP is a string replacement Function and "%20" is just a string.

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, 2004Report This Post
Gold member
posted Hide Post
Your example works perfectly fine but don't know why it is not working in my link with the same syntax.
I tried the same thing for Google link and it worked fine.


Webfocus 8.1.0.5
Windows, all output
 
Posts: 56 | Registered: February 16, 2011Report This Post
Virtuoso
posted Hide Post
Solving that requires that we see both the statement that you used, the input that's causing problems and the error message you got.

My first guess is that the resulting URL didn't work for you because you replaced an underscore with %20 that was already an underscore before you replaced spaces with underscores. That would result in an HTTP 404 or similar.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Replace an underscore by %20

Copyright © 1996-2020 Information Builders