Exec job from command line

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
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Exec job from command line

Post by Juls »

Hi,
I read all the posts on this but still seem to be having problem
I am running the following code in my batch file but get an error:

project = ENT_DWH
job=seq_STAGING

e:\Ascential\DataStage\Engine\bin\dsjob -run NORMAL -wait ENT_DWH seq_STAGING -param '$envLoadDateTime=2008-04-14 12:00:00'

Invalid arguments: dsjob -run
[-mode <NORMAL | RESET
[-param <name>=<value>
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | F
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-useid]
<project> <job|jobid>

Status code = -9999 DSJE_DSJOB_ERROR
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Does it work if you pass in full credentials - server, username and password? Or just the server?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post by Juls »

chulett wrote:Does it work if you pass in full credentials - server, username and password? Or just the server? ...
It doesn't work when I add server. When you say user name and password? Which are those? I am an admin on the box.. shouldn't it run under my credentials?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It "should" but doesn't always work without it. try with whatever user/pwd you would use with the client.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post by Juls »

chulett wrote:It "should" but doesn't always work without it. try with whatever user/pwd you would use with the client. ...
Added username and password but still doesn't work. See below:

E:\>e:\Ascential\DataStage\Engine\bin\dsjob -run NORMAL -wait -server FTLDETL01
-user juls -password s1203 ENTERPRISE_DATA_WH seq_STAGING_VANTIVE -param '$
envLoadDateTime=2008-04-14 12:00:00'
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
[-param <name>=<value>]
[-warn <n>]
[-rows <n>]
[-wait]
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
[-userstatus]
[-useid]
<project> <job|jobid>

Status code = -9999 DSJE_DSJOB_ERROR

E:\>pause
Press any key to continue . . .
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Server name and userid/password need to come first, right after the dsjob command - then all of the other stuff.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post by Juls »

I changed it but still same error
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Take that NORMAL keyword out or qualify it properly with the command line token -mode.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

Post by Juls »

Actually I just got it to work .. .Now I need to enhance this line to add -param values. However I have environment variables as parameters. What would the syntax be for this:
variable: $envLoadDateTime
value: 2008-04-14 12:00:00

would I put $envLoadDateTime=2008-04-14 12:00:00 in quotes?
"$envLoadDateTime=2008-04-14 12:00:00" or just value in single ticks, because it has spaces?
Post Reply