Page 1 of 2

generate HTML report in datastage

Posted: Wed Mar 18, 2009 4:12 am
by qutesanju
hi,
how can i generate report for all datastage jobs kept in any folder?

right now i can generate report n designer FILE-->Generate Report
but for this I have to open each job in designer and then generate report for this

My question is that If in one folder there are 100 jobs then it's not feasible to open each and every job and then generate report.

at folder is it possible to generate report directly?

Posted: Wed Mar 18, 2009 8:20 am
by chulett
What's not feasible about it? It's just... tedious. :wink:

The dsjob command with the -report option does the same thing, from what I recall, so you could create a batch file to get a list of jobs and then loop through that list to create reports for all of them.

Posted: Wed Mar 18, 2009 2:35 pm
by pneumalin
dsjob -report only gnereates the job RUN report in BASIC|DETAIL|XML format, which is the Director Log Info. Regarding to job DESIGN report from Designer->File->Generate Report, I have not found out a way to create then in a systematical way. Appreciated if someone has done that and share with us...

Posted: Wed Mar 18, 2009 2:46 pm
by chulett
Ah... true. You need to use dsdesign.exe to get that HTML report, check this post for an example from Kim:

viewtopic.php?t=124036

Posted: Fri Mar 20, 2009 10:58 am
by pneumalin
Thanks for the sharing, and it did work. I also found the syntax in Page 227 Designer Guide.

Posted: Thu Apr 02, 2009 1:55 am
by qutesanju
pneumalin can u pls share exact command or syntax here?

Posted: Thu Apr 02, 2009 7:20 am
by chulett
Do you not have the pdf mentioned? Check the link I posted? Both places show the syntax.

Posted: Sun May 24, 2009 10:06 pm
by vincentxy
Here's how i did it. Just replace the italics part with your values.
Feel free to correct/comment. Thanks.

Step1: Get a list of all jobs and save it to a text file - joblist.txt
On datastage server: $DSHOME/bin/dsjob -ljobs project_name >~/joblist.txt

Step2: Ftp this file to your PC as the next command, dsdesign, is a client executable.

Step3: Write a simple dos patch program to loop through joblist.txt to generate the report like so.

for /F %%a in (joblist.txt) do dsdesign.exe /H=hostname /U=user_id /P=password project_name %%a /R /RP=report_destination_folder

Posted: Sun May 24, 2009 10:55 pm
by kduke
There is a batch file which will do this for you. It is on my tips page.

Posted: Mon May 25, 2009 7:32 am
by chulett
vincentxy - in 'later' versions of DataStage, dsjob is installed on the client side as well so that can cut down (by one) the number of steps needed. :wink:

Posted: Tue May 26, 2009 3:54 am
by vincentxy
Thanks for the info chulett. The version I am using is 7.5.1 :)

Posted: Tue May 26, 2009 7:19 am
by kduke
Download the bat file. It does everything you want. It does dsjob to get a list of jobs then runs Designer on each job in a project. What else do you need?

Posted: Tue May 26, 2009 7:32 am
by chulett

Posted: Tue May 26, 2009 2:32 pm
by kduke
You have lost your mind. :lol:

Posted: Thu May 28, 2009 7:49 am
by qutesanju
Kim, could you please locate batch file........i am not aware @ TIPS page