Page 1 of 1

lookup on a string or variable & Debugger

Posted: Wed Nov 22, 2006 8:13 am
by vij
1.what function I need to use for looking on a string/variable for a given input.
for eg.,
I want to check whether the string '0123' is present inside a variable which has a value 0123456? which function shuld I use?

2.which function shuld I use for replacing the character by another?
for eg., in the value '123,456' I want to replace the comma by null.

pls explain.

3.I am creating parallel jobs.I heard that debugging cant be done as there is no debugger available in DataStage, is this true?
pls explain me how to use it, if it is available...

Thanks a ton!

Posted: Wed Nov 22, 2006 8:50 am
by ArndW
1. Use INDEX('0123456','0123',1)
2. Use CONVERT(',','.','123,456')
3. No interactive line-by-line debugger in PX. Debugging needs to be done via other means.

Posted: Wed Nov 22, 2006 8:55 am
by chulett
I was going to give the same answers for #1 and #2 but didn't think that would be valid for PX jobs. :? Other than in a BASIC transformer, that is.

Posted: Wed Nov 22, 2006 9:05 am
by ArndW
They retrofitted those two functions into PX and kept the same order of arguments as well.

Posted: Wed Nov 22, 2006 9:12 am
by chulett
Cool, good to know.

Posted: Wed Nov 22, 2006 9:14 am
by ArndW
funnily enough those are the 2 functions I find most useful in a typical PX transform stage as well.

Posted: Fri Nov 24, 2006 3:09 am
by roy
Hi,
Debugging can be done via peek stage, throwing some sample data to log or simply by dumping records to sequentiql or dataset files.

IHTH,