User Variable activity

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
pattemk
Participant
Posts: 84
Joined: Wed May 16, 2007 4:04 pm

User Variable activity

Post by pattemk »

Hi , i am trying to pass the whole sql as a parameter to a particular job.

exec_commd-->user_variable-->parallel job

Query is like below
SELECT CUSTID CUSTOMER, EMPID, CITY FROM TABLE A WHERE A.CUSTID = 123

I have used the following argument in the usser variable activity stage

Field(Trim(StartLoop.$Counter,'"'),@FM,1)

i was able to pass only SELECT CUSTID CUSTOMER to the job , could you please advice how should i write the argument in order for the job to get the whole sql.

Thanks
kumar
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

What you are doing in the exec command activity?
pandeeswaran
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

You must have more in the job than:
exec_commd-->user_variable-->parallel job
...since you use the output "StartLoop.$Counter".

I think the loop separator is set comma as default som if you pass your query statement though the loop it will cut the query where it encounters the first comma and only pass "SELECT CUSTID CUSTOMER" to the job
_________________
- Susanne
pattemk
Participant
Posts: 84
Joined: Wed May 16, 2007 4:04 pm

Post by pattemk »

Yes, i do have start loop and end loop in my job,

how should write the argument in the uva stage to provide the whole sql statements.

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

Post by chulett »

As noted, make sure your 'list of things' you are iterating thru have a proper delimiter between them, one that doesn't occur in the data.
-craig

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