Reports to Database

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
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Reports to Database

Post by laknar »

I would like to generate reports for entire project or folder thru command line

cmd : dsjob -report (project name)

can any one help me how to generate reports for particular folder.

and How can i redirect the reports into database.

roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi & Welcome aboard :),
The report generated is an ascii file, you can use the system redirection mechanism to redirect it to a file of your choice.
After obtaining the data in a file you can use a DS job to load it to a DB of your choice, much like any other data you load to DB tables.

a sample ussage of the -report option with no redirection :

Code: Select all

C:\Ascential\DataStage\Engine\bin>dsjob -report DS324_Solutions Stam DETAIL

**************************************************
STATUS REPORT FOR JOB: Stam
Generated: 2007-04-26 16:54:54
   Job start time=2007-04-26 15:43:11
   Job end time=2007-04-26 15:43:11
   Job elapsed time=00:00:00
   Job status=1 (Finished OK)
   Job has no stages.
Status code = 0

IHTH (I Hope This Helps),
Last edited by roy on Thu Apr 26, 2007 7:03 am, edited 1 time in total.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Reports to Database

Post by sud »

Well, the dsjob -report command generates report for a particular job only and not for a folder. So in the script that you call dsjob -report you have to specifically mention the job names for which you want the report. You can save the report in a file and load into a database column (preferably a clob column).

Usually saving the whole report is a wastage, so if you can be specific about your requirements and the reason why you want to save the report, strategies could be identified for the same.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

EtlStats will generate all jobs, all jobs in a sequence. Take that code and modify it to meet your needs.
Mamu Kim
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

can you explain step by step to implement the same

Post by laknar »

kduke wrote:EtlStats will generate all jobs, all jobs in a sequence. Take that code and modify it to meet your needs.

Hi i found in the Duke site but there are lot of sqls and Jobs.

can you explain step by step to implement the same .Please
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Search here. There are lots of posts be Kim explaining the same, and in depth.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The job DSJobReportDbDriver is the one job to start with. It runs a job called DSJobReportDb which runs dsjob -report XML as a before job routine for whatever job you feed into it as a parameter. Take out the code to run the job DSJobReportDb and just execute a shell to run dsjob without the XML option. >> to whatever file you want. You are done.

Install EtlStats and you can report off the tables like ETL_ROW_HIST. Much easier in the long run. More professional too.
Mamu Kim
Post Reply