Page 2 of 3
Posted: Thu Feb 02, 2006 2:21 pm
by patonp
Is it as simple as concatenating multiple dsx files into one, or is it more complex than that?
Posted: Thu Feb 02, 2006 2:26 pm
by kaps
I guess concat should work. let us know.
Posted: Thu Feb 02, 2006 2:37 pm
by ray.wurlod
patonp wrote:Is it as simple as concatenating multiple dsx files into one, or is it more complex than that?
It's more complex than that. Each DSX file has its own header. You need to make sure that the result has only one header.
Posted: Mon Feb 06, 2006 3:37 pm
by kaps
I don't think we need to do that. I tried concating two dsx files into one and imported it which worked fine.
Thanks
Posted: Mon Feb 06, 2006 10:15 pm
by kumar_s
kaps wrote:I don't think we need to do that. I tried concating two dsx files into one and imported it which worked fine.
Thanks
Do you mean to say with two header?
-Kumar
Posted: Mon Feb 06, 2006 10:36 pm
by Andal
Here is the code to export the set of Jobs.
Code: Select all
@echo off
ECHO **************Beginning Export of Jobs
For /F "tokens=1" %%i in (C:\Anand\ExportJobs\DsxList.txt) do (
echo **** %%i
C:\Progra~1\Ascential\DataStage7.5\DSExport.exe /U=Username /P=Password /H=HostName /JOB=%%i ProjectName C:\Anand\ExportJobs\aa.dsx
REM wait for the dsexport to finish
:2
pslist dsexport > nul
if not errorlevel 1 goto 2
type C:\Anand\ExportJobs\aa.dsx >> C:\Anand\ExportJobs\bb.dsx
)
ECHO *** Export completed successfully.
Save the Code as a Bat File.
Here C:\Anand\ExportJobs\DsxList.txt will contain the list of Jobs to be exported.
aa.dsx will contain the current job which is being exported.
bb.dsx will conatin the final dsx.
If we are having Multiple headers in a same DSX it wont give any problem.
PSLIST.exe can be downloaded from sysinternals.com.
You should put pslist.exe and the batch file in the same folder.
Posted: Tue Feb 07, 2006 12:27 am
by kumar_s
kaps wrote:I don't think we need to do that. I tried concating two dsx files into one and imported it which worked fine.
Thanks
Yes, Concatinating two dsx with two header is also working
:D
-Kumar
Posted: Wed Feb 08, 2006 4:51 pm
by patonp
I've written a routine that reads data from a file containing server/project/job names and accepts login information as parameters. The routine then executes the DSExport command using this information.
If the user has incorrectly specified these parameters or job names, the routine hangs. I'm not certain, but I think that DSExport is attempting to prompt the user for correct login credentials and/or a corrected server/project name. I'm guessing that the routine is not aware of this and simply waits for the executable to terminate.
Is there any way to simply have the DSExport function return an error if incorrect parameters are passed to it?
Thanks again!
Peter
Posted: Wed Feb 08, 2006 5:58 pm
by kaps
Peter
I am not sure about routine. But I have done this using Bat script.
If you want I can share you the code. If you write a batch script you can also include that in your datastage designer as a utility so that the functionality is one click away.
Thanks
Posted: Wed Feb 08, 2006 10:27 pm
by kumar_s
kaps wrote:Peter
I am not sure about routine. But I have done this using Bat script.
If you want I can share you the code. If you write a batch script you can also include that in your datastage designer as a utility so that the functionality is one click away.
Thanks
This is the place to share... your are always welcome to share your creative ideas.
-Kumar
Posted: Wed Jul 05, 2006 9:44 pm
by Chuah
kaps wrote:DSExport command can also export individual jobs.
Thanks
Hi,
Can DSExport export only Table Definitions without exporting the jobs etc ? What I'm trying to do is export all my Table Def into an XML document.
Pls advise.
Rgds
Chin
Posted: Wed Jul 05, 2006 11:23 pm
by chulett
You'd have to do that from the Manager.
Posted: Thu Jul 06, 2006 1:58 am
by ray.wurlod
I once wrote (and posted) a routine to dump a table definition in CSV, IMF or XML format.
dsexport job design and exe
Posted: Thu Sep 27, 2007 10:45 am
by etlbets
Is there an option to export both the job designs and exe using the command line
Posted: Mon Oct 01, 2007 1:29 am
by DS_SUPPORT
Yes, we can do that
Code: Select all
Call DSExecute("NT","C:\Progra~1\Ascential\DataStage7.5\DSExport.exe /U=Admin /P=***** /H=Hostname /JOB= TestJob PROJECTNAME c:\aa.dsx",Abc,Abcd)
Call DSExecute("NT","C:\Progra~1\Ascential\DataStage7.5\DSExport.exe /U=Admin /P=***** /H=Hostname /JOB= TestJob /EXEC /APPEND PROJECTNAME c:\aa.dsx",Abc,Abcd)
You cannot include the executables in the same command, but you can append it with the existing DSX file, in the another call.Just I have tried this and didnt follow any error handling.