Page 1 of 1

dsjob command help

Posted: Tue Dec 28, 2010 2:23 pm
by svhari76
Hi All

I am trying to execute the sequencer from command prompt and i used following command.

Code: Select all

 ./dsjob -server Servername -user username -password password -run -param SrcDir="Dir path" -param SrcFile="FileName"-warn 5000 Project  Jobname

The job has been kicked off, but failed because of the file not being able to find in the job.

In the job default src file name is A.txt(doesn't exist in directory) and I am passing file name as B.txt from command prompt and B.txt file exists in the Src directory location.The file name in the job is referrence( something like #SrcFile# instead of A.txt).

If i rename the B.txt as A.txt and run the job, it runs fine.

Basically the job is not taking the paramter value from command prompt.

Can some one please let me know what am i doing wrong here?

Posted: Tue Dec 28, 2010 2:26 pm
by chulett
What happens if you put in the space you are missing in front of "-warn"?

Posted: Tue Dec 28, 2010 4:13 pm
by kduke
Do it this way.

Code: Select all

-param 'SrcDir=Dir path'

Posted: Tue Dec 28, 2010 4:29 pm
by svhari76
Chulett - It has space aftre warn .
kduke - I tried as you suggested, but still job fails.

Any other suggestions?

Posted: Tue Dec 28, 2010 5:22 pm
by chulett
svhari76 wrote:Chulett - It has space aftre warn.
It doesn't have one in what you posted, hence the suggestion. :?

Can you post an accurate version of what you actually tried to run after the change Kim suggested so we can see what it was you ran? Give us real values rather than made up examples if you'd like people to be able to help properly.

Posted: Tue Dec 28, 2010 9:09 pm
by PaulVL
Can you show us the parameter you used in the file stage? Did you fully qualify the path of the file with your variable or did you just pass the filename?

Posted: Wed Dec 29, 2010 9:23 am
by svhari76
I tried with both single Quote and double quote options for the params.I have 4 other paramters which i wanted to take the default ones that i defined in the job.(So i am not passing them)

Code: Select all

./dsjob -server Server1 -user User1 -password password -run -param "SrcDir=/dvl/etl/projects/Project1/Source"-param "SrcFile=PCC.txt" -warn 5000 ProjectName SequencerName

Posted: Wed Dec 29, 2010 10:09 am
by chulett
You only need the quotes if there are spaces in any of the parameter values, so try again without any. And you still show the command without the proper whitespace between all the bits. :?

Posted: Wed Dec 29, 2010 11:22 am
by svhari76
The spaces are getting deleted when i am editing this message with dummy values.

I tried this as well still it fails because job can not get the file name from commadn prompt.

Code: Select all

./dsjob -server Server1 -user User1 -password  password  -run  -param   SrcDir=/dvl/etl/projects/Project1/Source  -param   SrcFile=PCC.txt  -warn 5000 ProjectName SequencerName


Posted: Wed Dec 29, 2010 11:34 am
by chulett
Things should be being passed fine, it would seem, so I'm assuming your issue is on the actual usage side. Since there's no final delimiter in your pathname, you'd need to include one when you actually assemble the parameters:

#SrcDir#/#SrcFile#

Or if you are doing this in your stage:

#SrcDir##SrcFile#

Make sure you add a trailing "/" to what you pass from the command line.

This is the information that PaulVL was asking for, btw.

Posted: Wed Dec 29, 2010 12:00 pm
by svhari76
In my job the source file path has been defined as #SrcDir#/#SrcFile#,
Job has individual parameters like SrcDir, SrcFile etc. More over in the director logs i am seeing my hardcoded file name rather than passed file name missing note.

Posted: Thu Dec 30, 2010 11:23 am
by svhari76
Ok, Now i should be able to pass the parameter to Sequencer, but this is not getting passed to my job from sequencer.

Code: Select all

./dsjob -server  Server -user  userid  -password  password -run -param SrcFile=PCC.txt  -warn 5000 Project SequencerName 
My sequencer suppose to pass the paramteres to my job.(All parameters are defined in the way they are in sequencer and mapped those paramteres in sequencer.

Is there any way that i can pass all the parameters in a file?( idon't have lparamfile,paramfile option in dsjob - DS7.x)

Posted: Thu Dec 30, 2010 11:26 am
by chulett
This just gets more confusing as we go deeper down the rabbit hole. :?

What makes you think your Sequence job is not passing the parameters properly to any jobs it runs? Are you using the Job Activity stage to run the jobs or some other mechanism?

Posted: Thu Dec 30, 2010 12:00 pm
by svhari76
Job Activity stage.

Before job activity stage i have execute commadn stage and i am seeing the passed file name coming in for this command. But when i execute the job from job activity stage it is not getting passed to job. I can see in the job logs that it is looking for default file and fails.(since it is not there, but for sure i have the file that i am passing in.)

Posted: Thu Dec 30, 2010 3:41 pm
by ray.wurlod
Hmm.. look on the Job tab of the Job activity - make sure that the parameter values are actually being set correctly. Then look in the job sequence log for a "job run requested" message, which should show the parameter values being passed to the job. Then look in the related log for the job itself, for the "job starting" event, which should show the actual parameter values received by the job.