Passing Multiple parameters to dsjob returns DSJE_DSJOB_ERRO

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

vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Passing Multiple parameters to dsjob returns DSJE_DSJOB_ERRO

Post by vish08 »

When multiple parameters, in this case FromDate and ToDate, returns error.
$ dsjob -run -mode NORMAL -jobstatus -parm FrDate=80909 ToDate=80910 SALES TestSales

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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I believe you need to have -param before each parameter. And its 'param' and not 'parm'.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

Thank you. I tried
$ dsjob -run -mode NORMAL -wait -jobstatus -param 'FromDate=80909' -param 'ToDate=80910' ADW_SALES TestSalesDetailFixEE
but returns
Error running job

Status code = -99 DSJE_REPERROR
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Post by jseclen »

Hi vish08

Your command is incorrect, the sintax is:

$ dsjob -run -mode NORMAL -wait -jobstatus -param FromDate='80909'
-param ToDate='80910' ADW_SALES TestSalesDetailFixEE

Try with this correction.


:wink: :D
Saludos,

Miguel Seclén
Lima - Peru
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

It should be coded as -parm FrDate=80909 -parm ToDate=80910.
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

Still the same error
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Correction. It should be -param.
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

Sorry. Still the same even without quotes.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Assuming your job is in a runnable state - compiled and not already running - try adding the authentication parameters to the command line: -server, -user and -password.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Your syntax looks correct. A 99 usually means job is not in a runnable state.
Mamu Kim
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

Thank you Craig. I as Developer can not dsjob from command line. Developer nned to have dsadm role. May be this is in v8.0.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Rot. A member of the Developer role for DataStage (provided all other permissions and credentials are in place) can legitimately use dsjob command. What error message do you get?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

I am getting, "Error running job

Status code = -99 DSJE_REPERROR"

I checked in Director. Job is in compiled state. I can run job from Director. But trying to run the same job from command line giving me error.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you try what I suggested? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vish08
Premium Member
Premium Member
Posts: 16
Joined: Mon May 12, 2008 8:45 am

Post by vish08 »

It did the majic. Thank you craig.

$dsjob -server ServerName:portnumber -user User.Name -password **** -run -mode NORMAL -wait -jobstatus -param FromDate=80909 -param ToDate=80910 ProjectName JobName

returns
Waiting for job...
Finished waiting for job
Job Status : (2)

Status code = 2

Job has some warnings. Next step is read parameters from a file. File structure is
FromDate ToDate
80101 80129
80130 80228
80301 80331
etc..
Post Reply