Page 1 of 2

dscmdexport command line problem

Posted: Thu Jul 08, 2004 11:02 am
by mtardif
Hi,
I'm trying to create a batch file that will be execute each night. This batch file will be execute from a Windows client computer.

Here is my Dos command:
dscmdexport /H=myunixserver /U=myuser /P=mypassword PROJECTNAME FILENAME > logfile

This command works perfectly... the only thing is, the dscmdexport prompt me a dialog box that require somebody to press a Yes or No button...

The message on the dialog box is: File xxx already exists Do you want to replace it ?

Dialog title: DataStage Repository Interface

But the file doesn't already exist (I have the date and the hour in the filename...).

We are using Datastage 6.2.

Is anybody seen that before.
Thanks.
Math.

Posted: Thu Jul 08, 2004 11:31 am
by ds_developer
Do you know that the xxx in the dialog box refers to FILENAME? I'm wondering if it could be referring to the logfile (maybe it isn't closing properly so it can't be overwritten). I would change the single > to >> (which appends to the existing file) and try again.

Also, welcome to the forum!

John

Posted: Thu Jul 08, 2004 11:38 am
by mtardif
Hi John,
Yes, I do know that XXX is the Filename.

I replaced the > by >>... and unfortunatly, nothing new happened... except that the log file became bigger...

Thanks.

Re: dscmdexport command line problem

Posted: Mon Feb 28, 2005 11:31 am
by PhilHibbs
mtardif wrote:Hi,
I'm trying to create a batch file that will be execute each night. This batch file will be execute from a Windows client computer.

Here is my Dos command:
dscmdexport /H=myunixserver /U=myuser /P=mypassword PROJECTNAME FILENAME > logfile

This command works perfectly... the only thing is, the dscmdexport prompt me a dialog box that require somebody to press a Yes or No button...

The message on the dialog box is: File xxx already exists Do you want to replace it ?

Dialog title: DataStage Repository Interface

But the file doesn't already exist (I have the date and the hour in the filename...).

We are using Datastage 6.2.

Is anybody seen that before.
Thanks.
Math.
No, I hadn't seen it before you started this thread, but I am seeing it now! I am using DS 7.0.2 and I have exactly this problem on my desktop PC, but not on my laptop, or on anyone else's PC. No matter what filename I use, it pops up a "DataStage Repository Interface - File c:\QA.dsx already exists. Do you want to replace it?" dialog box. If I then look in explorer, sure enough the file is there, zero bytes, timestamp of a few seconds ago.

I have raised this with Ascential, they say that they have only heard of this problem once before, and were unable to recreate it. Was that you, or is there a third lucky winner out there somewhere?

(p.s. I know, the OP hasn't been seen around here for a while, so consider that an open question to the crowd)

Posted: Mon Feb 28, 2005 3:59 pm
by Sainath.Srinivasan
Try something like

dscmdexport .... < !EOF
Y
!EOF

This will simulate a 'Y' entry as an user-response and move beyond the prompt.

Posted: Mon Feb 28, 2005 4:11 pm
by tonystark622
Try something like

dscmdexport .... < !EOF
Y
!EOF

This will simulate a 'Y' entry as an user-response and move beyond the prompt.
Will that work on Windows?

Tony

Posted: Mon Feb 28, 2005 4:53 pm
by chulett
I know what the problem is! :wink: I've run into it before...

Check the current default for the Manager's 'Export DataStage Components' screen. If you have 'Export as XML Document' checked, it will stop and prompt you with this strange little question. This in spite of the fact that you are not creating an .xml export. :?

Posted: Wed Mar 02, 2005 4:15 am
by PhilHibbs
chulett wrote:.... This in spite of the fact that you are not creating an .xml export. :?
I wish I was creating an XML export, it would be very useful.

Do you know where this setting is stored, so that my script can turn it off and restore it afterwards?

Posted: Wed Mar 02, 2005 6:46 am
by roy
Hi,
the most simple solution would be to rename or delete the file in your bat file before running the dscmdexport command.
I suppose something like

Code: Select all

del /Q/S DSExport.dsx
would do, just replace the DSExport.dsx withthe name you use.

IHTH,

Posted: Wed Mar 02, 2005 7:20 am
by chulett
PhilHibbs wrote:I wish I was creating an XML export, it would be very useful.
No, you are missing the point. :? You can only create a .dsx export from the command line. However, in your client software on the machine you are doing the export from, the 'Export as XML' option is checked. This causes the stupid error you are seeing!

Go into the 'Export DataStage Components' gizmoski and uncheck it. You'll be fine after that. I swear. :wink:

Posted: Wed Mar 02, 2005 7:31 am
by PhilHibbs
chulett wrote:Go into the 'Export DataStage Components' gizmoski and uncheck it. You'll be fine after that. I swear. :wink:
I use DS Manager every day, and I only use the xml export option, so that would require me to un-check it at the end of every day to ensure that the backup worked. That kind of error-prone manual tedium is what I automated the backup to avoid!
roy wrote:the most simple solution would be to rename or delete the file in your bat file before running the dscmdexport command.
Nope, the error occurs whether or not the file existed before running dscmdexport.

Posted: Wed Mar 02, 2005 7:47 am
by chulett
Ok, then I can only see a couple of solutions. No amount of 'renaming' will help, as you've found. So...

1) Find out where that option is stored in the registry (assuming it is) and somehow automagically turn it off and then back on again during your backup.

2) Run the backup from a different machine. :shock:

How much of a possibility is #2?

Posted: Wed Mar 02, 2005 11:12 am
by PhilHibbs
chulett wrote:Ok, then I can only see a couple of solutions. No amount of 'renaming' will help, as you've found. So...

1) Find out where that option is stored in the registry (assuming it is) and somehow automagically turn it off and then back on again during your backup.

2) Run the backup from a different machine. :shock:

How much of a possibility is #2?
That is my current workaround! It's only saving the problem up for later, though.

I have looked in the registry and I can't find it, and I've asked Ascential for this informaton.

Posted: Wed Mar 02, 2005 11:16 am
by chulett
If you do come up with a solution, post it back here. I'm sure there would be plenty of people looking for a generic solution to this issue.

In my mind, something to first determine the current setting is needed. If the option is found to be set, unset it and then put it back at the end of the backup. If it's not set, then do nothing. That would be cool. 8)

Posted: Wed Mar 02, 2005 11:52 am
by Mike
Phil,

I did a quick change/compare to isolate the registry entry. It is here:

Code: Select all

[HKEY_CURRENT_USER\Software\Ascential Software\DataStage Client\Manager]
"XML Format"="1"
"1"=xml, "0"= dsx

I'm sure you're aware of the usual disclaimers/warnings associated with editing the Windows registry.

Please do let us know what solution you come up with.

Thanks,
Mike