Status of DS JObs

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

Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Status of DS JObs

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

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

"You can never have too many knives" -- Logan Nine Fingers
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Post 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........
Assume everything I say or do is positive
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

dsjob -log is used to log the information rather retrieving information.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post 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.
Regards,
Shree
785-816-0728
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

The above information is available in "dsjob -jobinfo" as well as Job Status .
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post 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
Regards,
Shree
785-816-0728
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
anisubim
Participant
Posts: 9
Joined: Wed Mar 14, 2007 12:06 am

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

Post by anisubim »

please tell me detail about the dsjobs from scratch
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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".
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anisubim
Participant
Posts: 9
Joined: Wed Mar 14, 2007 12:06 am

I need dsjobs commandline process in datastage

Post by anisubim »

please kindly reply, because i am implementing these steps in my project
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Re: I need dsjobs commandline process in datastage

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply