Reading parameter file

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
mallikharjuna
Participant
Posts: 81
Joined: Thu Nov 30, 2006 7:46 am
Location: india

Reading parameter file

Post by mallikharjuna »

hi,

I have created all the parameters in one script ex:param.sh, i want to use this parameter script in my main script, please let me know the execution command for executing dsjob with these parameter script
MALLI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

An Internet search for "dsjob parameter file" will yield many hits. The easiest solution is to have your file set up as a values file for a Parameter Set that every job uses, then the values (as defined) are automatically picked up and used, or can be overridden using setname.parametername=value dot notation if required in the dsjob command.

If you don't want to do that, and your parameters file is arranged as name=value pairs, then you can use grep to extract the appropriate line. Enclose each grep command in backquotes within the dsjob command. For example

Code: Select all

dsjob -run -param `grep myparam param.sh | tr -d \n` projectname jobname
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:?: Can you clarify what you mean when you say "created all the parameters in one script ex:param.sh"?

A shell script that "creates parameters" would typically mean sets up environment variables (using 'set') which jobs built to do so would use. If it is meant to be a parameter value file and is more of a simple text file - rather than a true shell script - with the name/value pairs that Ray mentioned then he's given you a couple of ideas there. If you still need help with this I'd suggest the clarification requested above be attempted.
-craig

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