Page 1 of 1

dsjob command

Posted: Mon Dec 11, 2006 4:34 am
by dspxlearn
Hi all,

I'm new in running datastage job on unix.
So, just wanted to know the way it is done.
After browsing to the DSXchange database, i could find the following steps..
In the unix prompt
1)went to the Datastage home.
Our dshome is --> /etl/ascential/Ascential/Datastage/DSEngine
2) then ran the command ../dsenv
3) then i was trying to use the following datastage command to run the job. I have all the rights to run the job.
dsjob -run -mode NORMAL <jobname>

But i was getting the error
dsjob: not found

Could any let me know the correct method in doing this, if i went wrong?

Posted: Mon Dec 11, 2006 4:50 am
by ray.wurlod
The dsjob executable is in the DataStage engine's bin subdirectory. This needs to be in your PATH, just as it does in Windows, or the full pathname of the executable must be given, just as it must in Windows.

So, if you're attached to the $DSHOME directory, you can use the relative pathname bin/dsjob.

To run a job you must specify the project as well as the job name, just as you must in Windows.

Posted: Mon Dec 11, 2006 6:03 am
by dspxlearn
Hi ray,

Thank you for the reply.
Here is the way i was executing the command.
I was in 'bin' subdirectory,then gave..

dsjob -run -mode NORMAL /etl/ascential/Ascential/DataStage/Projects/<project> /etl/ascential/Ascential/DataStage/<jobname>

but still i am getting the same error..
Please let me know if it is the right method.

Posted: Mon Dec 11, 2006 6:10 am
by ajith
Try

./dsjob - Arguments ...


Thats how u execute that from bin ...

Thanks,
Ajith

Posted: Mon Dec 11, 2006 7:06 am
by dspxlearn
Hi ajith,

Do you mean that first i have to be in bin subfolder and execute the following??

./dsjob -run -mode NORMAL ./etl/ascential/Ascential/DataStage/Projects/<project> ./etl/ascential/Ascential/DataStage/<jobname>

I am getting
ld.so.1: dsjob: fatal: libvmdsapi.so: open failed: No such file or directory
Killed

so, i executed ./dsenv being in DSEngine subdirec..
Even now i am facing the above error.

Posted: Mon Dec 11, 2006 7:19 am
by ajith
dspxlearn wrote:Hi ajith,

Do you mean that first i have to be in bin subfolder and execute the following??

./dsjob -run -mode NORMAL ./etl/ascential/Ascential/DataStage/Projects/<project> ./etl/ascential/Ascential/DataStage/<jobname>

I am getting
ld.so.1: dsjob: fatal: libvmdsapi.so: open failed: No such file or directory
Killed

so, i executed ./dsenv being in DSEngine subdirec..
Even now i am facing the above error.
okay, I get that
Now u have to point ur library path to where ur lib file lies ..
Say ur lib directory is in /Ascential/DataStage/DSEngine/lib/

Then execute this

export LIBPATH=:/lib:/usr/lib:/Ascential/DataStage/DSEngine/lib/

and run the previous command ...

ie ./dsjob -arguments

That would help ...

PS: bin and lib will be two directories in same path usually

Posted: Mon Dec 11, 2006 8:34 am
by dspxlearn
Hi ajith,

Thank you very much!!
For exporting this, do we need to be in the root or in DSEngine subfolder??
Can you please give me the steps involved for executing this 'dsjob' command?

Posted: Mon Dec 11, 2006 8:45 am
by ajith
dspxlearn wrote:Hi ajith,

Thank you very much!!
For exporting this, do we need to be in the root or in DSEngine subfolder??
Can you please give me the steps involved for executing this 'dsjob' command?
You dont have to be root, This is not a permanent solution too, It is just for that shell. you have to execute this each time when u open a new shell. If you want it permanently you can edit your .profile file and add this line

ie $ vi .profile
$ export LIBPATH='.......'

Save the file and exit.

alternatively you can execute export LIBPATH='......' from command line, as I mentioned, that will work in only that shell.


After executing export command

you can go to the bin directory

and do

./dsjob --arguments

That will be working
If you encounter some problem somewhere please respond with the error message.

Thanks,
Ajith

Posted: Mon Dec 11, 2006 8:58 am
by chulett
You need to 'source' dsenv first, then run the dsjob command:

Code: Select all

cd $DSHOME
. ./dsenv
./bin/dsjob [arguments]

Posted: Mon Dec 11, 2006 2:11 pm
by ray.wurlod
The project and job are not given as pathnames.