Regarding Executing jobs in Unix

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Regarding Executing jobs in Unix

Post by manojbh31 »

Hi,

I want to run jobs in UNIX Platform
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You are going to need to be a wee bit more explicit than that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shamshad
Premium Member
Premium Member
Posts: 147
Joined: Wed Aug 25, 2004 1:39 pm
Location: Detroit,MI

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's dsjob (lower case, no trailing "s").
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to include "-mode NORMAL" in the command line as well.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Your command will not work.

try

Code: Select all

dsjob -run -mode NORMAL ric_dss_dev J0dsjob
Raghavendra
Participant
Posts: 147
Joined: Sat Apr 30, 2005 1:23 am
Location: Bangalore,India

Post by Raghavendra »

-jobstatus waits for the job to complete, then returns an exit code derived from the job status.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

That means that the $DSHOME/bin directory is not in your environment's path; execute the `$DSHOME/bin/dsjob' command.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Make sure that the parent directory of dsjob is mentioned in the list of directory pathnames in your PATH environment variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manojbh31
Premium Member
Premium Member
Posts: 83
Joined: Thu Jun 21, 2007 6:41 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply