Batch script for exporting shared container in datastage ?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
akshaym87
Participant
Posts: 5
Joined: Tue Aug 11, 2009 1:24 pm

Batch script for exporting shared container in datastage ?

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

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

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... if you have 8.1 and have updated it to include the istool function, that may change this. Not sure. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
akshaym87
Participant
Posts: 5
Joined: Tue Aug 11, 2009 1:24 pm

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

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

"You can never have too many knives" -- Logan Nine Fingers
akshaym87
Participant
Posts: 5
Joined: Tue Aug 11, 2009 1:24 pm

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

Post by chulett »

It's all already posted here, searching will turn them both up.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lakshmi.vasu
Participant
Posts: 6
Joined: Thu Oct 22, 2009 3:57 am
Location: Bangalore

Re: Batch script for exporting shared container in datastage

Post 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
Thanks,
Lakshmi
lakshmi.vasu
Participant
Posts: 6
Joined: Thu Oct 22, 2009 3:57 am
Location: Bangalore

Re: Batch script for exporting shared container in datastage

Post 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
Thanks,
Lakshmi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Batch script for exporting shared container in datastage

Post by chulett »

lakshmi.vasu wrote:Also what is the syntax to execute this batch script through command line.
Type its name.
-craig

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