Page 1 of 1

DataStage remove NEL from data

Posted: Tue Oct 31, 2017 6:08 pm
by gaelynalmeida
Hi all,

I am trying to remove the NEL character (Next Line - U+0085) from an input data set. I have successfully implemented the code below to remove other non-printable etc. characters from my input data. However, this does not address NEL, which remains on the output file.


Does anyone know how to do this?
I tried adding CHAR(133) to the convert string, but that does not work.

viewtopic.php?p=464130

Posted: Tue Oct 31, 2017 10:24 pm
by chulett
What "code below"? If it's something from the linked topic, I'd suggest you include your actual code here instead.

Posted: Wed Nov 01, 2017 4:48 am
by ray.wurlod
Try using either UniChar(133) or Char(133,1).

Posted: Wed Nov 01, 2017 9:52 am
by chulett
Ah yes, the magical ",1" secret sauce, forgot about that already. :wink:

Posted: Wed Nov 01, 2017 2:24 pm
by gaelynalmeida
chulett wrote:What "code below"? If it's something from the linked topic, I'd suggest you include your actual code here instead.
Hi Craig .. thank you for responding. I meant the "link below"

viewtopic.php?p=464130

I will try the uchar suggestion and update this post with the outcome

Posted: Wed Nov 01, 2017 3:47 pm
by chulett
Figured, hence my comment. If you do end up needing help with this, best to post your own code here so we can see what you're actually dealing with.

Posted: Wed Nov 01, 2017 5:53 pm
by gaelynalmeida
:)

how do I post code? I don't see an option to attach a dsx file, or for adding screenshots. I can upload a sample job with sample input and output files.

Posted: Wed Nov 01, 2017 9:25 pm
by chulett
There's no need to do anything dsx related. Screenshots work like most other boards, you upload them to a file sharing service and then use [img] tags to embed a link to them in a post. However, all we're asking for is a simple copy/paste of the derivations. You can also wrap them in

Code: Select all

[/b] tags to preserve any formatting or whitespace involved, otherwise the forum software will strip it all out. They are the green pieces of text you've probably seen in other posts.

Posted: Thu Nov 02, 2017 12:08 am
by ray.wurlod
gaelynalmeida wrote:I will try the uchar suggestion and update this post with the outcome
UniChar() function, not UChar() function.

error with UniChar

Posted: Tue Nov 14, 2017 9:48 pm
by gaelynalmeida
I get an error when I try to use the UniChar function in the transformer. Is there some additional component that I need to install?

Posted: Wed Nov 15, 2017 8:11 am
by chulett
Can you be more specific, please? Post the error and let us know when you get it - editing the design, when you compile it, at runtime?

Posted: Wed Nov 15, 2017 6:13 pm
by ray.wurlod
UniChar() and UniSeq() functions are only available if NLS is enabled.

Posted: Tue Dec 05, 2017 6:36 pm
by gaelynalmeida
OK .. thank you for responding.

Does it need to be enabled at the project or the job level?

If project, then I will check with the admins to see whether this is enabled.
I tried researching ways to figure this out myself, but did not find any information.

Thank you

Posted: Tue Dec 05, 2017 6:37 pm
by gaelynalmeida
chulett wrote:Can you be more specific, please? Post the error and let us know when you get it - editing the design, when you compile it, at runtime?
I get the error when editing the design in the transformer stage - i.e. the transformation is "red", which in this case, means it does not recognize the function