lookup on a string or variable & Debugger

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

lookup on a string or variable & Debugger

Post 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!
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

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

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

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

They retrofitted those two functions into PX and kept the same order of arguments as well.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Cool, good to know.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

funnily enough those are the 2 functions I find most useful in a typical PX transform stage as well.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply