How to access parameters passed from script in DS Job.

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
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

How to access parameters passed from script in DS Job.

Post 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
vishal_rastogi
Participant
Posts: 47
Joined: Thu Dec 09, 2010 4:37 am

Post by vishal_rastogi »

you can create the routine and read the sequential file
Vish
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Post by balu536 »

But i need the sequential file name. How can i get that?
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Post by balu536 »

I got the solution. Thanks vishal and ray...
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

Mark the topic as resolved :-)
Arvind
Post Reply