Page 1 of 1
Reports to Database
Posted: Thu Apr 26, 2007 6:25 am
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.
Posted: Thu Apr 26, 2007 6:51 am
by roy
Hi & Welcome aboard
![Smile :)](./images/smilies/icon_smile.gif)
,
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),
Re: Reports to Database
Posted: Thu Apr 26, 2007 6:58 am
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.
Posted: Thu Apr 26, 2007 8:44 pm
by kduke
EtlStats will generate all jobs, all jobs in a sequence. Take that code and modify it to meet your needs.
can you explain step by step to implement the same
Posted: Fri Apr 27, 2007 10:16 am
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
Posted: Fri Apr 27, 2007 10:38 am
by DSguru2B
Search here. There are lots of posts be Kim explaining the same, and in depth.
Posted: Fri Apr 27, 2007 2:53 pm
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.