Data Cleaning Issue in Px

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
neeraj_purohit
Participant
Posts: 1
Joined: Wed Sep 14, 2005 6:34 am

Data Cleaning Issue in Px

Post by neeraj_purohit »

Hi All,

I am facing problem while ceaning data. The problem is like this.

I have a character field having numeric data but along with '$' sign.
The possible values of data are as give below for example
$-
$100
$-100

I don't want $ in the output and i have to handle '$-' type of data.
As "Ereplace" or "Change" function will not work for parallel job, I am using "Convert" function.

For cleaning this I am using following function in transformer stage.

If (IsNull(Trim(Convert("$-","",Field1)))) then "" Else Convert("$","",Field1)

But while compiling it gives me error.

If, just for the compilation sake, I use Trim(Convert("$-","",Field1))
Then the compilation goes fine.

Please suggest me the reason for this compilatoin error.
I think, there is some problem with 'IsNull' function and '$' sign.

Waiting for your reply...

Bye,
Neeraj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This kind of question should really go in the PX forum, by the way.

You haven't given us the actual compilation error, but I'm guessing it's the fact that you are using Server functions in a PX transformer. You can use all of those mentioned - IsNull, Trim, Ereplace, etc - but you have to switch to the BASIC Transformer to do that. And then you pay the price for that choice. :wink:

Look in the Parallel Job Developer's manual for the PX equivalents of those functions and use those instead.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply