passing parameters from table.

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

Post Reply
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

passing parameters from table.

Post by snt_ds »

Hi guru's,

I have to pass set of parameter values to a job sequence from tables.I acheived it through writing to a file and the read it as parameter file.Is there any other way to perform this?Thanks.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What database is it?
With either oracle or db2 or even sybase for that matter, you can probably write a small routine that invokes command line sql using DSExecute(), queries the table and returns the value. What parameter value to get?, that could be decided with an input parameter that you send to the routine.
If you are doing well with pouring the parameters to a file and then using that, I say stick to it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Dsguru thanks for your reply.Database is sybase.Can i call these routine using excecute command activity and parse command output values to the job parameters like reading from a parameter file?Could you plz share some sample code or link i can refer too?Thanks for your time.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If you were to run a sql command from unix command line, how would you do that for sybase?
Wrap that in DSExecute() and you have yourself a routine. Search the forum for specific examples of how to use DSExecute().
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply