dsjob -run

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

dsjob -run

Post by kavuri »

Hi,
I am trying to run my jobs in command prompt. But I am unable to do so I am getting following error.

$ dsjob -run -mode NORMAL bhidev facility_fact
ksh: dsjob: not found.
thusmiannadv21: /home/bhi

Please tell me what changes ( like PATH or LIBPATH) I have to make ?

Thanks
Kavuri
pimmit22043
Participant
Posts: 38
Joined: Thu Jul 26, 2007 6:11 am

you need to find the path for the dsengine.

Post by pimmit22043 »

you need find the path for the dsengine and like this and /home/dsadm/Ascential/DataStage/DSEngine/bin

and run.
-RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First 'source' your dsenv file to set the environment:

Code: Select all

cd `cat /.dshome`
. ./dsenv
Then run your job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Re: you need to find the path for the dsengine.

Post by kavuri »

I tried as you told but I am getting following error.

$ dsjob -run -mode NORMAL bhidev facility_fact
exec(): 0509-036 Cannot load program dsjob because of the following errors:
0509-150 Dependent module libvmdsapi.so could not be loaded.
0509-022 Cannot load module libvmdsapi.so.
0509-026 System error: A file or directory in the path name does not exist.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine/bin


Thanks
Kavuri
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

Hi Craig,

I tried it.

$ cd `cat /.dshome`
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ . ./dsenv
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ dsjob -run -mode NORMAL bhidev facility_fact
ksh: dsjob: not found.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$


Previously somewhere I studied some .so file need to be executed or something. can you tell me how can I run my jobs properly?

Thanks
Kavuri
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's all it should take as everything should be set in your dsenv file. :?

Try this - after doing the previous steps, try running your job like this:

Code: Select all

$DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
And let us know what happens.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

Hi Craig,
I tried but in vain.
I am getting error. May be something needed to modified in dsenv file. Can you figure out what should be modified.


$ cd `cat/.dshome`
ksh: cat/.dshome: not found.
thusmiannadv21: /home/bhi
$ cd `cat /.dshome`
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ . ./dsenv
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
ksh: DSHOME/bin/dsjob: not found.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$


Thanks
Kavuri
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not DSHOME - $DSHOME
-craig

"You can never have too many knives" -- Logan Nine Fingers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

Sorry Craig,

I found the job successful, but I am not getting the target file generating. But when I run job from director I got the outout.

Even I am not getting any errors.

$ $DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact

Status code = 0
thusmiannadv21: /home/bhi


Thanks
Kavuri
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

When I am trying to run it again, it is giving error.

$ $DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
Error running job

Status code = -2 DSJE_BADSTATE
thusmiannadv21: /home/bhi


Thanks
Kavuri
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, at least now it's trying to run the job. What 'state' is it in now? The error tells you the job is not runnable - that can mean it is not compiled or is aborted and needs to be reset first or it may already be running.

You need to figure that one out.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

Yes, thanks Craig, Now its working fine, I had changed in my C++ routine which I compiled, but I havent compiled job since then. So I am getting this error.

Can you tell me how you have identified error for the STATE code? Is there any manual shows for this error this is the reason?

One more thing, I think process is running in the background, without saying when the job will complete? Is there any way to find that? And where can I retrieve log file in which directory?

I dont want to look at Director for log. I want to see it in command prompt.

I appreciate your help and advices.

Thanks
Kavuri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark thread as Resolved.
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 »

kavuri wrote:Can you tell me how you have identified error for the STATE code? Is there any manual shows for this error this is the reason?
The error codes have been posted here in the past and can be found in the $DSHOME/include/dsapi.h file, from what I recall. Mostly, it's just something you learn, either first hand or from reading posts here.
kavuri also wrote:One more thing, I think process is running in the background, without saying when the job will complete? Is there any way to find that? And where can I retrieve log file in which directory? I dont want to look at Director for log. I want to see it in command prompt.
Yes, without one of the "wait" options, it will spool the job off as a normal background process and immediately return to the command line. You can read about "-wait" and "-jobstatus" options here or in yor pdf docs, they would cause the command to wait for the job to finish before returning to the command line. The difference is in the nature of the codes returned.

You can't read the logs easily except from the Director. You can, however, check the job's status using dsjob with (oddly enough) the -jobstatus option from the command line.

All this and more in the Command Line Interface section of the Server Job Developer's Guide pdf.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

Thanks Craig, I appreciate your directions for learning.

Thanks once again.
Kavuri
Post Reply