Page 1 of 2

Status of DS JObs

Posted: Thu Mar 01, 2007 2:41 am
by Sreedhar
HI,

How do we know that a dsjob is in compile state or uncompiled state?

I know the following methods, please let me know if you have any other.

1) From the director we see the status of the job compiled or not.

The reason why need this is that when we are moving the code from one system to the other, if the job is in uncompiled state that particular job can not be moved.

would like to know if there is any mechanism by which i can test before hand that all the jobs are in compile state before moving the jobs from one env to other env.

Posted: Thu Mar 01, 2007 8:04 am
by chulett
How are you 'moving' jobs? There's no restriction that says it 'cannot be moved' if it is not compiled - unless you've got no way to compile it wherever you are moving it to? :?

Checking visually via the Director is probably the simplest. I guess you could also use the MJC or Multi-Job Compiler in the Manager, it can easily show you all 'uncompiled' jobs and then optionally compile them for you.

Posted: Thu Mar 01, 2007 8:35 pm
by csrazdan
You can check the status of DataStage job from command prompt. Execute following commands:

# Set DataStage Environment
$ cd `cat /.dshome`
$ . ./dsenv

$ cd bin

$ dsjob -jobinfo <DataStage Project Name> <DataStage Job Name>

This output of command would look like following:

Job Status : RUN OK (1)
Job Controller : not available
Job Start Time : Thu Dec 7 16:43:10 2006
Job Wave Number : 2
User Status : not available
Job Control : 0
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : Thu Dec 7 16:43:14 2006
Job Process ID : 0
Invocation List : C001_ArchGenData

Hope it helps........

Posted: Thu Mar 01, 2007 9:07 pm
by DSguru2B
You can probably script it. Do a dsjob -ljobs to get all the jobs, read it one by one and pass it to dsjob -report or dsjob -log and grep for 'Job Status'. You can also check if its anything other than 1 or 2 then you can load the job name in a seperate file. A few lines of scripting.

Posted: Fri Mar 02, 2007 3:09 am
by kumar_s
dsjob -log is used to log the information rather retrieving information.

Posted: Fri Mar 02, 2007 5:46 am
by Sreedhar
Thanks for the responses.

-Jobinfo will give the jobinfo.

But my requirement is that from the unix console is there any means by which i can know if the job(present state of the jobs) is in compiled state or not.

JobInfo will help me partially. If the job is compiled and run then definetly it helps me to know that the job is in compiled state.

But if I compile and don't run, then there isn't any means by whihc I can know that the job is in compile state or not.

Just want to understand if there is any means by which I can know that .


Thanks In advance.

Posted: Fri Mar 02, 2007 9:06 am
by DSguru2B
Well if its in a runnable state then you "dsjob -report" will give you either Job status = 1 or 2 or 99. 99 (Not running) will tell you that its in a compiled state. If you get
"ERROR: Failed to open job

Status code = -1004"

That means its not in a runnable state.

Thanks for the clarification kumar, your right, -log is to write to the log rather than to retrieve it.

Posted: Fri Mar 02, 2007 8:50 pm
by kumar_s
The above information is available in "dsjob -jobinfo" as well as Job Status .

Posted: Tue Mar 13, 2007 10:17 pm
by Sreedhar
-report is as good as the jobinfo but gives much more details then the jobinfo.

It has got three return values as jobinfo
1 - finished OK
2 - finished with Warnings
3- Aborted.
99- Job not running.


I understand if the stats of 1-3 indicates that the job is in executable form, that implies that it is has been compiled.

Both these -report and -jobinfo take the status of the job from the previous runs.

Let me explain what is happening in my case.


We test the entire job. that mean a status of 1-3 will be displayed if i use -report or -jobinfo.

I send a request to delivery team to pick up for releasing it to other env.

in between sending the mail and before delivery people picking up the job some one just changes the annotation of the job for some reason. So it goes into uncompile state. Due to which the migration of job fails.

but at this time if i run the jobinfo or -report then it will give me the previous status of the job but not the current status.

Hope i am clear enough this time.


with this back ground now I would like to know is there any method by which i can know the status of the job before releasing.


Thanks

Posted: Tue Mar 13, 2007 10:44 pm
by narasimha
Sreedhar wrote:I send a request to delivery team to pick up for releasing it to other env.
What is the mechanism that the delivery team is using to release it in other environments.

I am new to DS jobs can u explain how to process from scratc

Posted: Wed Mar 14, 2007 12:29 am
by anisubim
please tell me detail about the dsjobs from scratch

Posted: Wed Mar 14, 2007 12:52 am
by chulett
Welcome anisubim - but you really need to start your own post, not jump on the end of someone else's post please. And in your new post, clarify if you mean 'dsjob' the command line function or if you literally mean 'DataStage jobs' in general. :?

Posted: Wed Mar 14, 2007 2:11 am
by kumar_s
Since we are referring to 'dsjob -jobinfo', I assume you are looking for dsjob function that available in command line. The best place to start with would be "Parallel Job Advanced User Guide". Under "Command Line Inerface".

I need dsjobs commandline process in datastage

Posted: Wed Mar 14, 2007 2:18 am
by anisubim
please kindly reply, because i am implementing these steps in my project

Re: I need dsjobs commandline process in datastage

Posted: Wed Mar 14, 2007 2:20 am
by kumar_s
anisubim wrote:please kindly reply, because i am implementing these steps in my project
Tell us, what exactly you are looking for and what you want to know.