command line functins that import and export the DS jobs
Moderators: chulett, rschirm, roy
command line functins that import and export the DS jobs
Hi All,
What is the command line functins that import and export the DS jobs?
What is the command line functins that import and export the DS jobs?
exporting sigle job from command line is possible
Hi
You can export individial jobs from command line. I don't know why others are saying it's not possinle. I have heard the samething but I could export an individual job from command line using dsexport command.
Thanks
You can export individial jobs from command line. I don't know why others are saying it's not possinle. I have heard the samething but I could export an individual job from command line using dsexport command.
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: exporting sigle job from command line is possible
to export an individual job use
dsexport [/XML] /U=username /P=password /H=hostname /JOB=jobname projectname to_file_name
dsexport [/XML] /U=username /P=password /H=hostname /JOB=jobname projectname to_file_name
kaps wrote:Hi
You can export individial jobs from command line. I don't know why others are saying it's not possinle. I have heard the samething but I could export an individual job from command line using dsexport command.
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
I think it's hardly fair to criticize someone for posting a useful answer to the original poster's question.ray.wurlod wrote:Now show us with dscmdexport command. This is the command about which it is asserted that individual jobs can not be exported, not dsexport.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
The problem with this is that when your batch executes dsexport, the dsexport starts running as a separate Windows process and your batch continues to execute in parallel. You will have to do something clever to detect when dsexport has finished executing. It may be possible to write a program that repeatedly tries to open the output file exclusively, which should fail while the dsexport command is running. I will investigate and update this post if I find an easy solution.WoMaWil wrote:Neil,
for to control dsexport, you will programm just somewhere something, for example a dos-batchfile.
There you can use normal pipes.
type file1 >> file2
(append file1 to file2)
Wolfgang
Update: Got it! You need to download pslist.exe from sysinternals.com, and use a batch file like this:
Code: Select all
@echo off
del %1.dsx
"C:\Program Files\Ascential\DataStage\dsexport" /U=dsadm /P=ascential /H=corus /JOB=%1 CorusITB_Dev %1.dsx
REM wait for file to exist
:1
if not exist %1.dsx goto 1
REM wait for the dsexport to finish
:2
pslist dsexport > nul
if not errorlevel 1 goto 2
REM file should exist now!
dir %1.dsx
It will all go horribly wrong if the job doesn't exist, or the password is wrong, or you can't connect to the server for some reason, it will wait forever for the file to appear, but you can break out of it with [Ctrl]-C.
Update: If the export fails for any of the aforementioned reasons, you will get dialog boxes telling you about the problem. When you have got rid of these dialog boxes, it will create a file, so the batch will then terminate correctly without Ctrl-C.
Last edited by PhilHibbs on Fri Sep 23, 2005 7:16 am, edited 1 time in total.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Participant
- Posts: 27
- Joined: Sun Mar 20, 2005 4:23 am
- Location: Brisbane, Australia
-
- Participant
- Posts: 27
- Joined: Sun Mar 20, 2005 4:23 am
- Location: Brisbane, Australia