DataStage export from command line

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

desais_2001
Participant
Posts: 9
Joined: Fri Feb 28, 2003 3:52 am
Location: India

DataStage export from command line

Post 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
ksoderlund
Participant
Posts: 10
Joined: Mon Nov 04, 2002 3:58 pm

Post 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
desais_2001
Participant
Posts: 9
Joined: Fri Feb 28, 2003 3:52 am
Location: India

Post 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
cheerfu1
Participant
Posts: 37
Joined: Mon Apr 21, 2003 8:47 pm

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

Post by chulett »

Yes... and no. It *is* there, but I believe that you'll find it there with a slightly different name.

-craig
Neil C
Participant
Posts: 46
Joined: Sun Apr 06, 2003 8:59 pm
Location: Auckland, New Zealand

Post by Neil C »

On v5 I think you will find it is named dsexport. This is what we use on v4.2.

Cheers, Neil
MAT
Participant
Posts: 65
Joined: Wed Mar 05, 2003 8:44 am
Location: Montréal, Canada

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

Post 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
MAT
Participant
Posts: 65
Joined: Wed Mar 05, 2003 8:44 am
Location: Montréal, Canada

Post by MAT »

Craig,

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

Thanks a lot

MAT
Athorne
Participant
Posts: 57
Joined: Wed Feb 04, 2004 1:37 pm

Post 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
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

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

Post by chulett »

Supposed to be coming in the next (Trinity) release.
-craig

"You can never have too many knives" -- Logan Nine Fingers
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post 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
Athorne
Participant
Posts: 57
Joined: Wed Feb 04, 2004 1:37 pm

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

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

"You can never have too many knives" -- Logan Nine Fingers
Post Reply