Page 1 of 2
Server routine in a parallel job with a Basic transformer?
Posted: Thu Mar 01, 2007 4:15 pm
by ady
Hi,
I am using a Basic transformer in a parallel job, can I use a server routine in that transformer ?. I am trying to do it and is is not working.
thanks
Posted: Thu Mar 01, 2007 4:36 pm
by lstsaur
What's not working? Please provide more detail.
Posted: Thu Mar 01, 2007 4:43 pm
by ady
The routine is written to strip off some unwanted characters which are present in a given column. But when i run the job the routine does not remove the characters, they are still there.
Posted: Thu Mar 01, 2007 5:01 pm
by ady
Ans = ""
FOR I = 1 to LEN (InputString)
ASCIICode = Seq(InputString[I,1])
IF ASCIICode >= 32 AND ASCIICode <= 122 AND ASCIICode <> 91 AND ASCIICode <> 93 AND ASCIICode <> 94 THEN Ans = Ans : InputString[I,1]
NEXT I
Thats the code for the routine, I need to get this routine working in the basic transformer or write it as a derivation for a column.
Can anyone help me do it ?
Posted: Thu Mar 01, 2007 5:02 pm
by DSguru2B
Do you get any error messages in the log? Did you test the routine via the test button while creating it?
Posted: Thu Mar 01, 2007 5:12 pm
by ady
Yes the routine works, I have tested it and it is also been used in other server jobs. But this is a totally different scenario.... basic transformer in a parallel job
Posted: Thu Mar 01, 2007 5:14 pm
by ady
There are no warning in the log file ..
Posted: Thu Mar 01, 2007 5:21 pm
by ady
Posted: Thu Mar 01, 2007 5:24 pm
by DSguru2B
Inside the job, make sure you the column that your running this routine on, is defined as varchar and you trim the column before passing it in.
Posted: Thu Mar 01, 2007 5:28 pm
by sud
You can only use a server component in a parallel job if it is a SMP system. So please check that first.
Posted: Thu Mar 01, 2007 6:21 pm
by DSguru2B
See if that routine works with the same input in a server job?
Posted: Thu Mar 01, 2007 9:06 pm
by ady
@ DSguru
The same column from the same source is been used in a server job and the routine works for it. i am comparing my parallel output with that server output to check if the routine is working.
My datatype is char, and yes i am trimming the values.
@ SUD
How can i find out if i am on a SMP system ?
Can i duplicate that routine functionality as a derivation ??
Thanx guys..
Posted: Thu Mar 01, 2007 9:08 pm
by DSguru2B
Not char, it should be varchar. Change it to varchar so that you can trim the spaces.
Posted: Thu Mar 01, 2007 10:30 pm
by ady
Ok , i will convert to varchar and try. But the routine is written in such a way that it works with data that has spaces too, as you can see in the picture above... it leaves spaces as spaces.
I will try and let you know .... thanx
Posted: Fri Mar 02, 2007 8:21 am
by DSguru2B
It should work but right now we are just shooting in the dark. Lets see which arrow hits bullseye. From a glance, nothing seems wrong with the routine and it should work in a px job just as it works in a server job. Write a px routine for it. I remember posting a routine that works with ascii numbers. You should be able to tweak it.