userstatus not reading string containing backslashes

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vg
Participant
Posts: 5
Joined: Mon Sep 10, 2012 11:48 am

userstatus not reading string containing backslashes

Post by vg »

Hi ,

I have a job that retrieves a select statement (contains backslash) from a file and returns this value in a userstatus variable and passing this userstatus variable in next job as as user-defined SQL in netezza enterprize stage.

problem is userstatus not reading compleate select statement containing backslashes

example--
select * from emp where empno=\'xxx\'


Any ideas how to achieve this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So your example is of what it should have looked like? If so, what does it actually end up looking like? Are you certain that this is a USERSTATUS issue and not the classic case where job parameters have quotes stripped from them?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vg
Participant
Posts: 5
Joined: Mon Sep 10, 2012 11:48 am

Post by vg »

yes its userstatus issue ,it should look like select * from emp where empno=\'xxx\'

but ended up like select * from emp where empno=

i am using above sql(userstatus) as query(read methold-user defined sql ) for netezza enterprize stage.... is there any other escape char i can use insted of backslash (\) ???
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You shouldn't need to escape the quotes any more. Check this technote to see how to allow them to be retained.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vg
Participant
Posts: 5
Joined: Mon Sep 10, 2012 11:48 am

Post by vg »

Thanks for your quick replay, unfortunately APT_OSL_PARAM_ESC_SQUOTE variable is not added in my project under user-defined environment variables, i requested my DataStage Administrator to add it, i hope he will :).
Post Reply