Page 1 of 2

DataStage export from command line

Posted: Fri Feb 28, 2003 4:02 am
by desais_2001
Hi,

I would like to SCHEDULE the job of performing Export/Import through DataStage. I understand that there is command line interface called dscmdexport through which the export/import can be executed through command line.

MY problem is that I am not able to find the executable dscmdexport on my DataStage server.

Can somebody help me where to locate and is there any pre-requisite to get this executable? Also let me know the detail explanation of if there is any other method by which I can automate DataStage Export/Import.

Thanks in advance.



Sanjay Desai

Posted: Fri Feb 28, 2003 9:05 am
by ksoderlund
Hi Sanjay,

DataStage export functionality is initiated on the client side and this is where the produced DSX or XML file is located. You should find the dscmdexport executable in your client directory (i.e., C:Program FilesAscentialDataStage). This also means that exports have to be scheduled from the client as well.

Kevin

Posted: Fri Feb 28, 2003 11:49 pm
by desais_2001
Hi Kevin,

Thank you very much for your explanation. Yes I could find the required executable in the directory u have mentioned.

Thanks once again.

Sanjay

Hi Sanjay,

DataStage export functionality is initiated on the client side and this is where the produced DSX or XML file is located. You should find the dscmdexport executable in your client directory (i.e., C:Program FilesAscentialDataStage). This also means that exports have to be scheduled from the client as well.

Kevin
[/quote]

Sanjay Desai

Posted: Mon Apr 14, 2003 12:44 am
by cheerfu1
I'm using DS version 5.1. is dscmdexport only availble in 6?

quote:Originally posted by desais_2001
[br]Hi Kevin,

Thank you very much for your explanation. Yes I could find the required executable in the directory u have mentioned.

Thanks once again.

Sanjay

Hi Sanjay,

DataStage export functionality is initiated on the client side and this is where the produced DSX or XML file is located. You should find the dscmdexport executable in your client directory (i.e., C:Program FilesAscentialDataStage). This also means that exports have to be scheduled from the client as well.

Kevin


Sanjay Desai
[/quote]

Posted: Mon Apr 14, 2003 8:53 am
by chulett
Yes... and no. It *is* there, but I believe that you'll find it there with a slightly different name.

-craig

Posted: Mon Apr 14, 2003 3:25 pm
by Neil C
On v5 I think you will find it is named dsexport. This is what we use on v4.2.

Cheers, Neil

Posted: Tue Apr 15, 2003 9:46 am
by MAT
I am interested in making exports from a prompt too. I found the command but I can't make it work. The usage is:

usage: dscmdexport [/H][/U][/P][/O] project filepath [/V]

/H Host name.
/U User name.
/P Password.
/O Omit flag.
project Specifies the project name.
filepath Specifies the export file name.
/V Verbose. Default to false.

How am I suppose to type this. I tried a thousand different ways. I always get the same message: Failed to attach to the project. Does anybody know the right way to enter the command?

Thanks

MAT

Posted: Tue Apr 15, 2003 10:50 am
by chulett
Ok, let's say you have the following setup:

Host name = fred
Userid = dstage
Password = getmein
Project = Production

(the names have been changed to protect the innocent, btw) Assuming this works like other commands I've used, your command should look like:

dscmdexport /H=fred /U=dstage /P=getmein Production pathname-of-output-file /V

Is that one of the combinations you tried? Keep in mind, some of this stuff is case-sensitive.

-craig

Posted: Tue Apr 15, 2003 10:55 am
by MAT
Craig,

1. I am stupid!
2. You're brilliant!

Thanks a lot

MAT

Posted: Mon May 24, 2004 11:31 am
by Athorne
I thought I found a thread in here addressing my question, but I can't find it now through searching so I'll be bad and tack on to this thread. Can anyone give me an example of an import/export from the command line on a DataStage Unix Server. From my understanding it can be done using the dsjob command with some parameters. I have not been able to get it to work so far. I caught a glimpse of a previous post that said something to the effect of command line import/export required a developer license... I appreciate any help, hopefully I'm not too off base with my post.

Thanks,
Andy

Posted: Mon May 24, 2004 3:37 pm
by ogmios
Athorne wrote:I thought I found a thread in here addressing my question, but I can't find it now through searching so I'll be bad and tack on to this thread. Can anyone give me an example of an import/export from the command line on a DataStage Unix Server. From my understanding it can be done using the dsjob command with some parameters. I have not been able to get it to work so far. I caught a glimpse of a previous post that said something to the effect of command line import/export required a developer license... I appreciate any help, hopefully I'm not too off base with my post.

Thanks,
Andy
On version 6 and below it's not possible from the server side, I doubt it's in the current version 7.x.

You can only export from the (windows) clients

Ogmios

Posted: Mon May 24, 2004 3:39 pm
by chulett
Supposed to be coming in the next (Trinity) release.

Posted: Tue May 25, 2004 7:09 am
by tonystark622
Andy,

In the 7.1.0 documentation it mentions dsjob -import to import a dsx file. Steve Totman from Ascential told me that the export isn't there yet. As Craig said, it's supposed to be coming.

That said, someone (Craig??) mentioned a Windows script to do backups. posted either here or on Ascential DeveloperNet.

Tony

Posted: Tue May 25, 2004 7:18 am
by Athorne
I actually found what I was looking for with the import. I don't know about anyone else, but I have the hardest time finding information in the delivered .pdf documentation from Ascential. Anyhow, what I did from the unix server side was to log in as the admin user and run this command line.

dsjob -import <project> <DSXfile w/location> -OVERWRITE

From the dsjob help I saw there was also a -JOB[S] option but I couldn't get it to work. Anyone know if you can import single jobs out of a Project DSXfile using the dsjob command line? I saw some really good BASIC and perl code examples on this forum, but thought I would persue something delivered first.

Posted: Tue May 25, 2004 7:27 am
by chulett
tonystark622 wrote:That said, someone (Craig??) mentioned a Windows script to do backups. posted either here or on Ascential DeveloperNet.
FWIW, there is a nice little batch file posted in the File Library on ADN to automatically do a client-side export of all projects from a server. Combined with a registered version of WinZip so the command line option is available, it is working well for me, exporting and packing up my dozen or so projects on our development server nightly. :D