Export job image as jpg unattended

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
mickboland
Participant
Posts: 27
Joined: Sun Mar 20, 2005 4:23 am
Location: Brisbane, Australia

Export job image as jpg unattended

Post by mickboland »

I use the cmd:

dsdesign.exe /H=%Host% /U=%User% /P=%Password% /SaveAsBmp=%BackupDir%\%DsxDate%\%%.bmp %Project%

to export the job image to a jpg. This issue i have is that it is interactive ie: dialogs pop up it a warning occurs etc..

Is ther any way to export the image of a job unattended?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Kim Duke has put together a bat file that does basically that. You'll find it here on his website, under the 'Scripts' section.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mickboland
Participant
Posts: 27
Joined: Sun Mar 20, 2005 4:23 am
Location: Brisbane, Australia

Post by mickboland »

he uses the same cmd - but it is not unattended the function returns message boxes
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure what you mean - it executes as a batch and I've used it to dump jpegs of all jobs in a project... all unattended.

Some commands recognize the fact they are running under batch control and disable or default the user prompts that you would get running the same command from the command line. Assuming that is what's going on in this case.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

I thought that'd save as a bmp not jpeg? I use a bmp2jpg program to convert to jpg and then sed the html from Kim's utilities converting bmp to jpg (and add a few other goodies).

We now store all our doco in the jobs and an annotation file that is shown in the HTML.

I've never had any popups from the command though.
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, true... bitmap image.
-craig

"You can never have too many knives" -- Logan Nine Fingers
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

I posted the method I used to run Ken's HTML in response to a poll on doco importance (http://dsxchange.com/viewtopic.php?t=88876)

This shows how to do the BMP JPEG stuff and all. Much less space used.
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The name is Kim not Ken. It should work unattended. SaveAsBmp.bat is the batch file.

The line from this batch file is:

Code: Select all

%Designer% /H=%Host% /U=%User% /P=%Password% /SaveAsBmp=%BackupDir%%DsxDate%\%%i.bmp %Project% %%i
Where %%i is the job name. This uses dsjob.exe to get a list of jobs to feed this line.

I have had a lot of problems with this lately. This hangs when done from Visual Basic. I also get an error when using the dsjob.exe from 7.5 versus 7.5.1A. Weird stuff.

The above command would cause problems in Ds7.1 as well. You had to hit return about every other job. Still runs fairly fast.

I also posted a similar batch file to generate the HTML from Designer. It should do a whole project as well. I like Tony Curcio's HTML much better. It has more and better information. I think the one in my product DwNav is better still. It has row counts and few more things like usage analysis reports.
Mamu Kim
aartlett
Charter Member
Charter Member
Posts: 152
Joined: Fri Apr 23, 2004 6:44 pm
Location: Australia

Post by aartlett »

kduke wrote:The name is Kim not Ken.
Sorry Kim. Can I get away woth blaming key shift or inattention on the keyboard?

We are using the utilities in a 7.1 environment without any hassles. The only change I had to make was to drop the DSJOB from the bat script as we don't have it (we use UNIX) and create the list of jobs to extract on the UNIX box and export them down.

I wonder if that's why we aren't getting the same issues with stops?
Andrew

Think outside the Datastage you work in.

There is no True Way, but there are true ways.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The stops are in the Designer. By that point dsjob is done. Others have had that problem. It maybe XP. You can get the dsjob.exe off the CD.
Mamu Kim
Post Reply