dsjob command not working properly

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
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

dsjob command not working properly

Post by kumarjit »

In our parallel job j_test_job in the project test_project , we are using a Parameter Set P_SET which has three user defined DS Environment variables in it:
$DIR [default value is/apps/temp]
$USER [default value is ADMIN]
$CONNECT [default value is password]

What we want is to run the same job using dsjob command (this is required to automate the job invocation) , and OVERRIDE default values of each of the environment variables at run time with different values

So I create a param value file p_value_ref with the following lines
$DIR=/apps/project
$USER=SYSADM
$CONNECT=password1
in the current working directory ($DSHOME/bin)
and then invoke the job using the following syntax :

dsjob -run -param P_SET=p_value_ref test_project j_test_job


I am getting an error stating that the DSJOB command was not able to load values of the parameter set P_SET from the file p_value_ref .

Am I missing / messing something here ?


Please help.



Thanks
Kumarjit.
Pain is the best teacher, but very few attend his class..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please report the exact and complete error message.

What happens if you execute the dsjob command while attached to the actual project directory?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

As per job log
Unable to load value file p_value_ref for parameter set P_SET .

To answer your second question, I really dont know how to run dsjob
while attached to the actual project directory
.




Thanks
Kumarjit.
Pain is the best teacher, but very few attend his class..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It means you 'cd' to the Project directory where the job lives and then start the dsjob command from there using a full path:

Code: Select all

$DSHOME/bin/dsjob -run -param P_SET=p_value_ref test_project j_test_job
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Your parameter set valuefile is located in the wrong directory. As parameter sets are project-specific, their valuefiles are stored under the project home directory. See the documentation under Parameter Set Dialog Box - Values Page for a Windows-based example, easily converted to Linux/Unix.

For dsjob, it's documented here

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... that sentence was split up and I misread the "in the current working directory" part as just where dsjob was being invoked from. Good catch.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

Now that I am able to LOAD the parameter set value file onto the parameter set thanks to the informative post by James Wiles , I got stuck somewhere else .

The job runs , but throws a new kind of error now .

Parameter set parameter P_SET.$DIR unset in value file p_value_ref.
Parameter set parameter P_SET.$USER unset in value file p_value_ref.
Parameter set parameter P_SET.$CONNECT unset in value file p_value_ref.


I have kept the file p_value_ref in the $DSHOME/Projects/test_project/ParameteSet/P_SET directory, and after that the job stopped giving errors like it is not able to load the file into the parameter set, but its not setting values of the ENVIRONMENT VARIABLES (used as job parameters) from the file.

What I suspect is I am not able to use the correct format of the parameter set value file for setting values to ENVIRONMENT VALRIABLES.

Can someone please guide me on this.

Please note:
The job runs good if executed from the Designer client interface.

Thanks for all your help.
Kumarjit.
Pain is the best teacher, but very few attend his class..
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

That error usually occurs when the listed parameter isn't present in the value file.

Try creating a new valuefile using the GUI interface, populating those parameters with the same values as in your current file. Compare the two valuefiles to see if there are any differences, and also try running the job from the command line using the newly created valuefile.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply