How I can get a Report which lists the status of all Jobruns

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

How I can get a Report which lists the status of all Jobruns

Post by 4friends »

Hi,

How I can Get a Report of all job ran succesfully, Job start time, end time and elapsed time and no of rows procesed from eack links(insert/update) or any aborts if occurs.

Thanks.
thanks & regards
kk
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: How I can get a Report which lists the status of all Job

Post by sachin1 »

hello,

i think you need to write a custom routine which needs to be used in "After-job Subroutine"(Job properties), which will track your job status and write an information in log file.


Main function to be used is DSGetJobInfo with InfoType=DSJ.JOBINTERIMSTATUS.

DSJ.JOBINTERIMSTATUS. Returns the status of a job after it has run all stages and controlled jobs, but before it
has attempted to run an after-job subroutine. (Designed to be used by an after-job
subroutine to get the status of the current job)

get some more information on DSGetJobInfo which will help you.
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

There are probably a couple of ways, but all of them are a bit tricky.

From DataStage shell ($DSHOME/bin/dssh) you could write a SQL that joins the appropriate tables. That would require a detailed knowlege of the unpublished UniVerse table structure and an even more detailed knowlege of UniVerse. I wouldn't try it.

The way I woud do it is to write a Server Routine. If you have a look at the Datastage BASIC manual that was distributed with your software, you will find functions such as DSGetProjectInfo(), which will obtain a list of all jobs, DSAttachJob and DSGetJobInfo(), which will attach to a named job and obtain a list of all stages in a job, and DSGetLinkInfo(), which will get link counts for each link on a stage.

That will get you started. Look at the doco and search this site for examples of those functions and decide whether it's something you want to go ahead with (cos its not simple).
Ross Leishman
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

I GOT THIS INFORAMTION BUT EXPLAIN IT ANY ONE KNOWS IT

Post by 4friends »

Before the job reports can be generated change the hard coded values in the DSaveAsBitmap.bat file:


:: -----------------------------------------------------------------

:: Hard-coded values. Dependent on each computer.

:: -----------------------------------------------------------------

SET Designer=C:\Progra~1\Ascential\DataStage\dsdesign.exe

SET DsJob=C:\Progra~1\Ascential\DataStage\dsjob.exe

SET JobList=JobList.txt

SET ProjectList=ProjectList.txt

SET DSLog=DSaveAsBmpLog

SET BackupDir=c:\DataStage\KimD\Jobs\%Project%

Next change the hard coded host, login, password and project details in the DSaveAsBmpDriver.bat driver batch file:


DSaveAsBmp.bat MyHost MyUser MyPwd MyProject

Import the KgdGenHtml.dsx file into your DataStage project and set the job parameters to suit your environment.

Compile all jobs and run SeqGenAllHtml:

SEQUENCE ---------> SEQUENCE ----------> SEQUENCER
Ok1 Ok2
KgdGenHtmlJobDocs KgdGenHtmlRoutineDocs Done


The SeqGenAllHtml will call two routines, JobDocs and RoutineDocs. It will write the html pages to the directory specified in the job parameters and embed a link to a bitmap.

When you run the DSaveAsBitmapDriver.bat it will create the bitmap files for each job in the project.
thanks & regards
kk
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

Post by 4friends »

I got this above inforamtion but iam not understand to this please explain it

Thanks in Advance...
thanks & regards
kk
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you specify "without using Director"? It's by far the easiest way.

The status of each and every job is in a separate table in the Repository.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

I would suppose he has 1000's of jobs and wants a "dashboard" type report to monitor the health of his system at any given point in time
at the Project level. Seeing this type of metadata in Director is easiest but completely unworkable for this type of reporting. I'm guessing he wants it at the Project level. (As do we).
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Go to Status view.
Disable display of Categories in the View menu.
Optionally sort by Status. Or sort by job name.
Print your report.
Re-enable display of Categories.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
4friends
Participant
Posts: 71
Joined: Tue May 01, 2007 12:51 pm
Location: Mumbai

Post by 4friends »

ray.wurlod wrote:Why do you specify "without using Director"? It's by far the easiest way.

The status of each and every job is in a separate table in the Repository. ...
At present iam preparing this report manually it will takes 1 hr, but
i want to make a job for preparing the report. Is there anyway for this by using any subroutine...

thanks in Advance
thanks & regards
kk
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course there is. But the routine does not ship with the product.

There are some who could be hired to construct one for a fee.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
baigdw
Participant
Posts: 15
Joined: Tue Jan 31, 2006 3:56 pm

Post by baigdw »

4friends wrote:
ray.wurlod wrote:Why do you specify "without using Director"? It's by far the easiest way.

The status of each and every job is in a separate table in the Repository. ...
At present iam preparing this report manually it will takes 1 hr, but
i want to make a job for preparing the report. Is there anyway for this by using any subroutine...

thanks in Advance
The process mentioned by Ray would be the best if you need to generated the report manually. It takes 5 min at max. I had generated reports earlier and used macros in Ultraedit to edit the file before publishing it for reporting purposes. The whole process took me about 15 min.

:idea:
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Search for EtlStats.
Mamu Kim
Post Reply