Passing a List of Values Into SQL as Parameter

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

dtatem
Participant
Posts: 54
Joined: Wed Jun 09, 2004 7:50 am

Post by dtatem »

This is how I implemented the solution,based on the feedback I received from gateleys's responses:

1.In my DataStage job, I created a parameter defined as"pListValues"
2. In the SQL I make a reference to this parameter and test it in the job to make sure it works.
3. I created a Sequencer, the first stage in the sequencer is the "UserVariables_Activity" -----> JobActivity

4. In the UserVariables_Activity stage, I added a row and named it "ListValues", in the second column,I added the values ie " 'C','D' ". You have to start with double quotes and end with double quotes.

5. In the JobActivity stage assign the parameter for the "pListValues". Click the "Insert parameter value" button. You should see the "UserVariables_Activity" variable followed by the "+". Click the "+" to assign the parameter... ie UserVariables_Activity.ListValues

I hope this helps

gateleys wrote:
dtatem wrote:Gateleys:

The SQL is fine...thinks are running fine now...

--dtatem
dtatem, since your problem has been addressed, can you please mark the post as 'Resolved'?


And, may be help our friend loe_ram13 with his query? I have already provided the solution, which he doesn't seem to get it. May be you could help him with your words.
loe_ram13
Participant
Posts: 35
Joined: Thu Apr 12, 2007 1:17 am

Post by loe_ram13 »

I got the solution.
Instead of using $ReturnValue,
I used $CommandOutput
Thanks for your help.
gateleys wrote:
dtatem wrote:Gateleys:

The SQL is fine...thinks are running fine now...

--dtatem
dtatem, since your problem has been addressed, can you please mark the post as 'Resolved'?


And, may be help our friend loe_ram13 with his query? I have already provided the solution, which he doesn't seem to get it. May be you could help him with your words.
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then you might mark the thread as Resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dtatem
Participant
Posts: 54
Joined: Wed Jun 09, 2004 7:50 am

Post by dtatem »

can you please explain the use of $CommandOutput you use and how you implemented it?

Thanks
loe_ram13 wrote:I got the solution.
Instead of using $ReturnValue,
I used $CommandOutput
Thanks for your help.
gateleys wrote:
dtatem wrote:Gateleys:

The SQL is fine...thinks are running fine now...

--dtatem
dtatem, since your problem has been addressed, can you please mark the post as 'Resolved'?


And, may be help our friend loe_ram13 with his query? I have already provided the solution, which he doesn't seem to get it. May be you could help him with your words.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

$CommandOutput is an activity variable associated with an Execute Command activity in a job sequence. It may be used to supply a value to any downstream activity, for example to a job parameter in a Job activity or to a routine argument in a Routine activity or to any trigger expression.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply