Use Modify stage for converting null string to empty string

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
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Use Modify stage for converting null string to empty string

Post by abhilashnair »

What is the syntax to be used within the Specification of Modify Stage if I need to convert a null value into empty string. In short I need the equivalent of NullToEmpty(Fieldname) which we usually use in transformer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The function is handle_null().

Code: Select all

outcolumn=handle_null(incolumn,"value")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Post by abhilashnair »

I want the the output to be empty string. So can I use

outcolumn=handle_null(incolumn,"") ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Easiest way to answer that question is to try it and see. Don't see why it wouldn't work, however.
-craig

"You can never have too many knives" -- Logan Nine Fingers
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Post by abhilashnair »

It works perfectly fine. Thanks
Post Reply