Page 1 of 2
Regarding Executing jobs in Unix
Posted: Fri Aug 24, 2007 3:09 am
by manojbh31
Hi,
I want to run jobs in UNIX Platform
Posted: Fri Aug 24, 2007 3:25 am
by ray.wurlod
So do lots of folks. The first thing you need is a DataStage server installed on that UNIX platform. Do you have that? Once you have that, investigate the dsjob command.
Posted: Fri Aug 24, 2007 6:29 am
by chulett
You are going to need to be a wee bit more explicit than that.
Posted: Fri Aug 24, 2007 7:09 am
by shamshad
As suggested by previous posters, once you have server part installed on UNIX platform, you can run the DSJOBS command to run your job through unix (or you can run through director if needed).
If you want to pass parameters to jobs, either you can create the PROJECT LEVEL parameters through ADMINISTRATOR and then read those parameters in DSJOBS command
OR
You can store all your parameter in a text file in UNIX and read the file from the script that execute your job.
Posted: Fri Aug 24, 2007 3:25 pm
by ray.wurlod
It's dsjob (lower case, no trailing "s").
Posted: Mon Sep 10, 2007 9:27 pm
by manojbh31
ray.wurlod wrote:It's dsjob (lower case, no trailing "s"). ...
Hi
I am trying with the following command
dsjob -run -jobstatus projectname jobname
but i am not able to run the job
wat jobstatus means.
the job which i am running doesnot contain any parameters.
and one more thing when the following command is used
int DSRunJob(
DSJOB(JobHandle,
int RunMode
);
whether this command is used in Job Control
Posted: Mon Sep 10, 2007 9:56 pm
by ArndW
You need to include "-mode NORMAL" in the command line as well.
Posted: Mon Sep 10, 2007 10:21 pm
by manojbh31
ArndW wrote:You need to include "-mode NORMAL" in the command line as well. ...
this is command i am running
Dsjob -Run -DSJ_NORMAL ric_dss_dev J0dsjob
ric_dss_dev is project name
J0dsjob is job name
let me know wat about jobstatus
Posted: Mon Sep 10, 2007 10:25 pm
by ArndW
Your command will not work.
try
Code: Select all
dsjob -run -mode NORMAL ric_dss_dev J0dsjob
Posted: Mon Sep 10, 2007 10:45 pm
by Raghavendra
-jobstatus waits for the job to complete, then returns an exit code derived from the job status.
Posted: Mon Sep 10, 2007 11:01 pm
by manojbh31
Raghavendra wrote:-jobstatus waits for the job to complete, then returns an exit code derived from the job status.
No yar, this command is also not working
dsjob -run -mode NORMAL ric_dss_dev J0dsjob
this is the error
command not found
Posted: Mon Sep 10, 2007 11:54 pm
by ArndW
That means that the $DSHOME/bin directory is not in your environment's path; execute the `$DSHOME/bin/dsjob' command.
Posted: Tue Sep 11, 2007 6:14 am
by ray.wurlod
Make sure that the parent directory of dsjob is mentioned in the list of directory pathnames in your PATH environment variable.
Posted: Tue Sep 11, 2007 6:19 am
by manojbh31
ArndW wrote:That means that the $DSHOME/bin directory is not in your environment's path; execute the `$DSHOME/bin/dsjob' command. ...
Thanks ArndW
but the status i am getting is
Status code = 0
Posted: Tue Sep 11, 2007 7:04 am
by chulett
You are getting that
from what? You've never explained exactly
how you are 'running' this command. A script? Bat file? Hand? Cron? Control-M? A solid gold Khama Sutra coffee pot or... a baby's arm holding an apple.
(sorry)
ps. You haven't managed to run anything, let alone attempted to execute the
dsjob command if your error is 'command not found'. And since you've hi-jacked this thread rather than start your own, we don't even know what Operating System or release of DataStage we're dealing with.
![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)