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     STRREP / CTRAN not behaving....

Read-Only Read-Only Topic
Go
Search
Notify
Tools
STRREP / CTRAN not behaving....
 Login/Join
 
Gold member
posted
Hi,

I am trying to replace all commas with a comma and carriage return/line feed in a long string but results are inconsistent.

DEFINE FILE TEMPFILE
CRLF/A2 = HEXBYT(13,'A1') | HEXBYT(10,'A1');
XLROLE/A1116 = STRREP(1116, BASEFIELD, 1, ',' , 3, ','|CRLF, 1116, 'A1116');
END

What's happening is unpredictable. Sometimes the comma is being replaced by a comma|line feed as expected. Sometimes the comma doesn't get replaced but a line feed occurs after the next blank character after the comma. There is no 'space' after or before all the commas in the base field (BASEFIELD). Is there confusion due to replacing the comma with another comma (and line feed)? I also tried CTRAN with the same results. Output is to EXL2K. SQUEEZE is ON.

Thanks, if you can help!


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Platinum Member
posted Hide Post
If you have a string in BASEFIELD that is 1116 characters long and contains one comma for example, then your replacement string would have 1118 characters, which is longer than XLROLE is declared.

So it might have something to do with the size of your target field not being allocated large enough.

Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Gold member
posted Hide Post
Thanks for your help. My code worked when executing via the servlet but not when in Command Console.


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report 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     STRREP / CTRAN not behaving....

Copyright © 1996-2020 Information Builders