Query about dscmdexport

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
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Query about dscmdexport

Post by Zabeerulla »

Hi,

The dscmdexport command is a command line application and can be run unattended. But when I use the command for e.g.
dscmdexport /H=R101 /O=1 dstage99 c:/scratch/project99.dsx, from the command line it pops up a window and says "The project99.dsx file already exists. Do u want to replace it?". Actually before running the command there was no file with name project99.dsx in the scratch directory.

Can u please me what's wrong here.
Thanks & Regards,

Zabi
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

The Correct syntax of the command

Code: Select all

usage: dscmdexport [/H][/U][/P][/O] project filepath
for e.g.

Code: Select all

dscmdexport /H=localhost /U=u123 /P=passwd  project filepath
Hope that helps.
Success consists of getting up just one more time than you fall.
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

Hi,

The problem is not with the syntax. When it executes, its asking for to replace the existing file. When I say yes, it's exporting all the jobs to that file. The problem is there is no file in that path for which I am exporting the project.
Thanks & Regards,

Zabi
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Try with /O=y
Success consists of getting up just one more time than you fall.
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

That's not working!
Thanks & Regards,

Zabi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Prevention is better than cure.

Code: Select all

DEL c:/scratch/project99.dsx
dscmdexport /H=R101 /O=1 dstage99 c:/scratch/project99.dsx
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Query about dscmdexport

Post by chulett »

Zabeerulla wrote:it pops up a window and says "The project99.dsx file already exists. Do u want to replace it?". Actually before running the command there was no file with name project99.dsx in the scratch directory.
Known 'bug' or issue with it where it wants to delete a non-existent export file. Your last manual export via Manager was done using the XML option instead of DSX and that screws up the command line export.

Go back into Manager, open the Export Components window, uncheck the XML option, close it and then your command line export will work. :D
-craig

"You can never have too many knives" -- Logan Nine Fingers
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

I found the issue regarding this.

This is the problem with Manager. I have used the Manager for exporting jobs as XML Document. After that if u try to run from the Command line which exports as dsx file, we'll get this replace file window.

Before running the dscmdexport command, Go into the 'Export DataStage Components' and uncheck the "Export as XML Document" option.
Thanks & Regards,

Zabi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you "find" that solution because Craig had posted it a mere 15 minutes before your post? :o
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:lol:

Hopefully, they 'found' it by searching the forums. I had the issue awhile back and helped someone else figure out an approach when they wanted to leave the XML option checked and still do command line exports.

They ended up scripting a registry hack that 'unchecked the option' first in the export script, performed the export and then restored the checked option. :shock: I was quite impressed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

Ray,

I was working on the dscmdexport command. In the meanwhile I needed to export one job. So I used the Manager, there I unchecked the XML option as I wanted it in dsx format. After I resumed to dscmdexport issue, then it was working properly. So I thought this may be the issue.

Thanks to all!
Thanks & Regards,

Zabi
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

So coincidence. Found by yourself. :wink:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can export one job with this post viewtopic.php?t=98137 using dsexport.exe instead of dscmdexport.exe.
Mamu Kim
Zabeerulla
Participant
Posts: 38
Joined: Tue Jan 10, 2006 1:25 am

Post by Zabeerulla »

Thanks Kim.

The information was very useful.
Thanks & Regards,

Zabi
Post Reply