Page 1 of 1

How to access parameters passed from script in DS Job.

Posted: Mon Sep 19, 2011 12:23 am
by balu536
Hi,
We have a requirement where we need to create a DS Job to extract data from Sequential file and load to Target (we need to create multiple target tables for different sequential files dynamically).

The DS job is executed from script and also the input file name is passed as paramter to the script.

Now the question is how can i access the parameter(filename which is passed from the unix script) in the Datstage job. I need to load that value in target table.

Also is it possible to create a table(from DS job) using the data coming from a column rather than the parameter name.

Please help me on this.....

Regards,
Balu

Posted: Mon Sep 19, 2011 12:53 am
by vishal_rastogi
you can create the routine and read the sequential file

Posted: Mon Sep 19, 2011 12:56 am
by ray.wurlod
The first question is easily answered, yes. Use shell variables (such as $1, $2) to access the command line arguments and use these in the -param options of the dsjob command used to request the job run ( for example -param jpEndDate=$1).

The meaning of your question about creating a table is not clear. What - precisely - do you want to do here? That question probably warrants a separate thread, as it seems to have little to do with the subject of this one.

Posted: Mon Sep 19, 2011 1:09 am
by balu536
But i need the sequential file name. How can i get that?

Posted: Mon Sep 19, 2011 1:47 am
by balu536
I got the solution. Thanks vishal and ray...

Posted: Mon Sep 19, 2011 2:49 am
by arvind_ds
Mark the topic as resolved :-)