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     Remove CTRLF char in a string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Remove CTRLF char in a string
 Login/Join
 
Member
posted
I am trying to remove a carriage control carriage in a varchar string that I am retrieving fron a db2 table. I used the bytval function to determine the dec character value '13', and then I tried to replace it using CTRAN with a dec char value of a space which is '32'. I then used the CTRAN function as follows:

LOAN_PROD_DESC_A/A255=
CTRAN(255,LOAN_PROD_A, 13, 32, 'LOAN_PROD_DESC_A);

This seems to work, but when I run the report that outputs in COM format, the record breaks in the middle of a record to a new line.

I also tried the STRREP function, using the characters that display in db2, which is '..', but again the record breaks in the middle.

LOAN_PROD_DESC_A/A255=
STRREP(255,LOAN_PROD_A,2,'..',1,' ',255,LOAN_PROD_DESC_A);
I can not change the output format either case

Varchar field on the table looks like this
N 4 ..Th in hex it looks like this
50 LOAN_PROD_A VARCHAR(255) N 4
X'0D25E388'

I need to get this to work ASAP, any assistance would be great
 
Posts: 6 | Location: 2401 International Lane | Registered: June 09, 2003Report This Post
Platinum Member
posted Hide Post
Jan,

I believe that you should also need to CTRAN character 10 to 32 (in addition to character 13). You need to replace the carriage return (13) AND the line feed character (10) with spaces.

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
Virtuoso
posted Hide Post
I agree with smiths. You need to replace both characters (CR and LF).


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Jan,

Check out this post

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Remove CTRLF char in a string

Copyright © 1996-2020 Information Builders