DSExport non interactive and supress warnings

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
anandsiva
Participant
Posts: 41
Joined: Wed May 21, 2008 7:58 pm
Location: Sydney

DSExport non interactive and supress warnings

Post by anandsiva »

We have a requirement to export all the jobs as XML and we have created a bat script to export it. But in case of warnings It waits for user input to proceed further. Is there a way to ignore these warning messages or any other alternative approach? We get the jobs list from XMETA and use that to create the DSEXPORT batch scripts
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try redirecting stdin from NUL to supply an infinite number of Enter presses.

Code: Select all

dscmdexport -options project < .\NUL
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anandsiva
Participant
Posts: 41
Joined: Wed May 21, 2008 7:58 pm
Location: Sydney

Post by anandsiva »

DScmdexport exports as dsx where as the requirement is to export as XML.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then do the same for dsexport. Or ANY command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anandsiva
Participant
Posts: 41
Joined: Wed May 21, 2008 7:58 pm
Location: Sydney

Post by anandsiva »

It still popped up window with warning the job doesn't exist.

"C:\IBM\InformationServer\Clients\Classic\dsexport" /D=Server:9080 /H=Host /U=user /P=XXX HLK_DEV /XML /JOB=CopyOfSQ25TgtChrgReg D:\CopyOfSQ25TgtChrgReg.xml < .\NUL
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then perhaps you shouldn't be attempting to export non-existent jobs. How are you generating the name(s) to export?
-craig

"You can never have too many knives" -- Logan Nine Fingers
anandsiva
Participant
Posts: 41
Joined: Wed May 21, 2008 7:58 pm
Location: Sydney

Post by anandsiva »

This is a test for what Ray has suggested. We have process which reads from XMETA the job name and then we generate set of dsexport command. For some reasons if dsexport throws some warning the entire batch gets stuck until manual intervention. We wanted to avoid this.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

I don't think it's possible. Well, everything's possible given a broad definition of "possible", but you know what I mean. I remember trying to do this myself, and I gave up and went with DSX exports instead. And if I can't do it easily, it isn't possible. :P

Perhaps you could try some sort of Windows automation software like AutoIt, write a little script that runs in the background looking for a particular window title and sending a click event to the Close or OK button. I did this to get rid of a bunch of import dialog boxes that were warning me about referenced jobs.

Or, write a DSX to XML converter...
Phil Hibbs | Capgemini
Technical Consultant
anandsiva
Participant
Posts: 41
Joined: Wed May 21, 2008 7:58 pm
Location: Sydney

Post by anandsiva »

Thanks.. As suggested we have created a C++ utility that looks for the dialogue box and record the message to a log file and closes the warning message.
Post Reply