Focal Point
[CLOSED] handle Control Chars

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3957081436

October 17, 2013, 04:21 PM
Sandhya j
[CLOSED] handle Control Chars
Hi,

I have small issue with my Stored Procedure Output.
My SP returns multiple description columns and some of them have the control characters. When I print &Lines it shows more than the actual number of rows because it break the rows when it find control char and counting as new line.

Anybody have idea?

Thank You
Sandya

This message has been edited. Last edited by: <Kathryn Henning>,
October 17, 2013, 04:48 PM
Doug
If you can identify the offending control characters, then you can use CTRAN, or other functions, to change the control characters to something else (maybe nulls?)...
October 18, 2013, 06:27 AM
Hank W.
Are the control characters stored in the data in the DB? Should they be there? What it sounds like is you get 'hard' carriage returns which are a bit nasty indeed, and hard to catch.

You need to identify and filter them out - I'd say this needs to be done at the DB level or in the stored procedure output formatting.


Cheers,
H.

WebFOCUS 8.1.05M
Oracle 11g - DB2
RedHat
October 18, 2013, 10:13 AM
Sandhya j
Thanks for your reply.

Yes these controls are stored in data in DB.
October 18, 2013, 12:20 PM
Tom Flynn
Try the REPLACE function in the Stored Proc:
  
REPLACE ((REPLACE ((REPLACE (substr(t6.scbdesc_text_narrative, 1,6000), CHR(13),'')), CHR(10),'')),';','') text_narrative,

Example


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe