dscmdexport command line problem

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

mtardif
Participant
Posts: 2
Joined: Tue Jun 08, 2004 4:30 pm

dscmdexport command line problem

Post 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.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post 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
mtardif
Participant
Posts: 2
Joined: Tue Jun 08, 2004 4:30 pm

Post 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.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: dscmdexport command line problem

Post 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)
Phil Hibbs | Capgemini
Technical Consultant
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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?
Phil Hibbs | Capgemini
Technical Consultant
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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)
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
Post Reply