running the job in UNIX

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

running the job in UNIX

Post by kittu.raja »

Hi,

I am trying to run a job in UNIX. I am using dsjob -run -mode NORMAL -param user=raj password=aaaa ETL Jp_raj
but I am getting an error saying
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-local]
[-useid]
<project> <job|jobid>

Status code = -9999 DSJE_DSJOB_ERROR

Can you help me out I searched in forumsbut didnt find it.
Rajesh Kumar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

YOu need the literal -param before each parameter value. You are missing it before the second parameter.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

DSguru2B wrote:YOu need the literal -param before each parameter value. You are missing it before the second parameter.
Should we keep inverted commas for the parameter values??
Rajesh Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? Are you asking if you need to quote them? No, not typically, unless perhaps the parameter value has a space in it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You dont have to, but you could. In that case make sure you have the entire string after the '-param' in inverted commas. So your command above will become.

Code: Select all

dsjob -run -mode NORMAL -param 'user=raj' -param 'password=aaaa' ETL Jp_raj
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure I've ever seen quotes referred to as 'inverted commas' before.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

DSguru2B wrote:You dont have to, but you could. In that case make sure you have the entire string after the '-param' in inverted commas. So your command above will become.

Code: Select all

dsjob -run -mode NORMAL -param 'user=raj' -param 'password=aaaa' ETL Jp_raj
thank you for your response, but I am getting an error saying

Error -3 getting information for parameter 'user'

Status code = -3 DSJE_BADPARAM
Rajesh Kumar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Do you have these parameters defined in your job, identical parameters?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Must not... note that they must exactly match the parameter name, case and spelling.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kittu.raja
Premium Member
Premium Member
Posts: 175
Joined: Tue Oct 14, 2008 1:48 pm

Post by kittu.raja »

chulett wrote:Must not... note that they must exactly match the parameter name, case and spelling.
I copied and pasted then also I am getting the same error
Rajesh Kumar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try without the quotes. If that does not work then post your exact command.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are these actually job parameters or are you intending to use the -user and -password options to the dsjob command itself?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

ray.wurlod wrote:Are these actually job parameters or are you intending to use the -user and -password options to the dsjob command itself? ...
As Ray mentioned, if that is the case then run the command

Code: Select all

$dsjob -server ServerName:portnumber -user raj -password aaaa -run -mode NORMAL -wait -jobstatus ProjectName JobName
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If that's the case, what it was that they "copied and pasted", I wonder? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

My guess is from this thread into their DataStage environment.
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