DataStage remove NEL from data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

DataStage remove NEL from data

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What "code below"? If it's something from the linked topic, I'd suggest you include your actual code here instead.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try using either UniChar(133) or Char(133,1).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah yes, the magical ",1" secret sauce, forgot about that already. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

gaelynalmeida wrote:I will try the uchar suggestion and update this post with the outcome
UniChar() function, not UChar() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

error with UniChar

Post 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?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

UniChar() and UniSeq() functions are only available if NLS is enabled.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

Post 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
gaelynalmeida
Premium Member
Premium Member
Posts: 12
Joined: Fri Jul 28, 2017 1:01 pm

Post 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
Post Reply