Page 1 of 1

Batch script for exporting shared container in datastage ?

Posted: Tue Oct 06, 2009 12:02 am
by akshaym87
Hi,

i wanted to know how can i export shared containers in datastage through back end batch scripts.

i was able to export jobs through the following script ::

@echo off
cls
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (MUConfigDetails.txt) do (
set /a N+=1
set v!N!=%%a
)
set hostname=!v1!
set username=!v2!
set password=!v3!
set folder=!v4!

for /f "tokens=* delims= " %%a in (MUJobList.txt) do (
echo export %%a starting .......
dsexport /H=%hostname% /U=%username% /P=%password% /JOB=%%a socaxs2mp23/Migration_Utility %folder%%%a.dsx
echo export ended successfully ......
pause
)




where MUJobList.txt is a text file containing the names of all jobs in ds.


now i want to export SHARED CONTAINERS through the batch script.
help needed.

thanks,
akshay

Posted: Tue Oct 06, 2009 7:25 am
by chulett
You have two choices: A) jobs only via dsexport. B) The entire project via dscmdexport. Some folks do the project and then hack it up using the 'DSX Cutter' script posted here.

Posted: Tue Oct 06, 2009 7:27 am
by chulett
Hmmm... if you have 8.1 and have updated it to include the istool function, that may change this. Not sure. :?

Posted: Wed Oct 07, 2009 3:47 am
by akshaym87
Hey, the thing is i have the scripts for exporting JOBS using dsexport and dscmdexport for exporting projects, but i need a script for exporting only a SHARED Container or any other object besides a job/Project.

i am currently using 8.0 version and i have the option of manually selecting shared containers and exporting them. is there a back end command to execute this???

help needed for all objects except job export. if you could make changes in my current script given above and paste it, that would be appreciated.

regards ,
akshay

Posted: Wed Oct 07, 2009 6:40 am
by chulett
As noted, I don't believe that you can. What people do is export the entire project and the 'cut' the dsx into individual component files afterwards.

Posted: Thu Oct 08, 2009 12:02 am
by akshaym87
hey thanks for the update craig ,

could u please post the script/command for the istool as well as the dsx cutter function.

thanks

Posted: Thu Oct 08, 2009 6:49 am
by chulett
It's all already posted here, searching will turn them both up.

Re: Batch script for exporting shared container in datastage

Posted: Mon Feb 22, 2010 2:37 am
by lakshmi.vasu
Hi,
I want to export multiple jobs or folder containing multiple jobs in it through command line.
I wanted to use the script below mentioned but what is MUConfigDetails.txt mentioned in the script.

Also what is the syntax to execute this batch script through command line.

thanks,
lakshmi
akshaym87 wrote:Hi,

i wanted to know how can i export shared containers in datastage through back end batch scripts.

i was able to export jobs through the following script ::

@echo off
cls
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (MUConfigDetails.txt) do (
set /a N+=1
set v!N!=%%a
)
set hostname=!v1!
set username=!v2!
set password=!v3!
set folder=!v4!

for /f "tokens=* delims= " %%a in (MUJobList.txt) do (
echo export %%a starting .......
dsexport /H=%hostname% /U=%username% /P=%password% /JOB=%%a socaxs2mp23/Migration_Utility %folder%%%a.dsx
echo export ended successfully ......
pause
)




where MUJobList.txt is a text file containing the names of all jobs in ds.


now i want to export SHARED CONTAINERS through the batch script.
help needed.

thanks,
akshay

Re: Batch script for exporting shared container in datastage

Posted: Mon Feb 22, 2010 2:39 am
by lakshmi.vasu
Hi,
I want to export multiple jobs or folder containing multiple jobs in it through command line.
I wanted to use the script below mentioned but what is MUConfigDetails.txt mentioned in the script.

Also what is the syntax to execute this batch script through command line.

thanks,
lakshmi
akshaym87 wrote:Hi,

i wanted to know how can i export shared containers in datastage through back end batch scripts.

i was able to export jobs through the following script ::

@echo off
cls
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (MUConfigDetails.txt) do (
set /a N+=1
set v!N!=%%a
)
set hostname=!v1!
set username=!v2!
set password=!v3!
set folder=!v4!

for /f "tokens=* delims= " %%a in (MUJobList.txt) do (
echo export %%a starting .......
dsexport /H=%hostname% /U=%username% /P=%password% /JOB=%%a socaxs2mp23/Migration_Utility %folder%%%a.dsx
echo export ended successfully ......
pause
)




where MUJobList.txt is a text file containing the names of all jobs in ds.


now i want to export SHARED CONTAINERS through the batch script.
help needed.

thanks,
akshay

Posted: Mon Feb 22, 2010 2:54 am
by ray.wurlod
It can not be done with any of the tools you are using.

Even with istool (version 8.1) there's no documented way to do it.

You might like to enable server side tracing, perform an export of just a shared container, then examine the trace file to learn how DataStage does it.

Re: Batch script for exporting shared container in datastage

Posted: Mon Feb 22, 2010 8:34 am
by chulett
lakshmi.vasu wrote:Also what is the syntax to execute this batch script through command line.
Type its name.