backup of folder using dsexport command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

backup of folder using dsexport command

Post by G.K.K »

hi,

i want to take backup of particular folder in datastage IBM websphere PX through command line dsexport. but it seems we can take for a particular jobs alone as a backup. but i dont know how to take backup of all the jobs in a particular folder.

E.g: the below shows for particular job to take export,
dsexport /H=192.215.23.19 /U=kamal /P=password /O=1 MT-SEVER/PROJECT1 /xml /job=JOBNAME_KAMAL KAMAL.xml

but i dont know how to take a folder as backup? :( please anyone help me in solving this. pls share this knowledge.

Thanks in Advance
kamal
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't - one job or the entire project are your two choices. You'd have to use the GUI to export a folder / category.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

There is a way but you would need to use a DOS bat file. Follow this link to Kim Dukes website http://www.duke-consulting.com/. The is a BAT script that will help you accomplish your request.
Jim Stewart
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

True. From what I recall it generates a list of job names in the category and then exports them one job at a time, appending. The key still being one job at a time. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a post on how to do this. You need to use Dwn_ExecTCL.exe to run a SELECT statement against DS_JOBS to get the job names in the category. Next you need to use the bat file to export these jobs one at a time. DataStageExport.bat will use a list of job names and export them one at a time. All of this is on my Tips and Tricks page.

You could use DataStageBackup.bat then use the Perl script to split this one dsx file into one per job. Probably almost as fast.
Mamu Kim
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

REG:backup of folder in DatastagePX

Post by G.K.K »

chulett wrote:You can't - one job or the entire project are your two choices. You'd have to use the GUI to export a folder / category. ...

What is that GUI export .. in the above you mentioned?
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

The GUI export is the one that is available through Datastage Designer.

--Rich
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

richdhan wrote:Hi,

The GUI export is the one that is available through Datastage Designer.

--Rich
what is the syntax for that GUI export? please share it!!!

thanks in advance
kamal
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

The Export and Import options are available in DS Designer. There is no coding or syntax required.

I recommend that you go through the documentation.

http://dwbalie.googlepages.com/dsbooks.pdf

This is the DS 7.5 documentation but good for a start. Go through the Manager Guide.

HTH
--Rich
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

G.K.K. in a private message wrote:what is that GUI export of folder category? can u explain how to do it.. please!!

thanks in Advance
kamal
First off, please just post your questions in the forum thread, there's no need to also send two private messages with questions.

Secondly, Rich has already got you covered. This 'GUI' is the Manager in releases before 8.x and part of the Designer client now in 8. You can 'export DataStage components' either individually, by category or export everything in the attached project.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you forward that private message to U ?

U is the name of one of our members. The second person personal pronoun in English is spelled "you", not "u". Please strive to maintain a professional standard of written communication when using DSXchange. You wouldn't document your work with SMS-style abbreviations, would you?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lakshmi.vasu
Participant
Posts: 6
Joined: Thu Oct 22, 2009 3:57 am
Location: Bangalore

How to export multiple jobs automatically throu command line

Post by lakshmi.vasu »

how to use Dwn_ExecTCL.exe to get the list of job names in the particular folder or category ?
Need help on this.

Thanks,
Lakshmi.
kduke wrote:There is a post on how to do this. You need to use Dwn_ExecTCL.exe to run a SELECT statement against DS_JOBS to get the job names in the category. Next you need to use the bat file to export these job ...
Thanks,
Lakshmi
lakshmi.vasu
Participant
Posts: 6
Joined: Thu Oct 22, 2009 3:57 am
Location: Bangalore

Re: backup of folder using dsexport command

Post by lakshmi.vasu »

Hi Kamal,
You have posted a query how to take backup of a paricular folder through command line. Did you get a solution on this. Even i want to export the jobs in a particular folder. Please share the script if you have implemented this task as it would be useful for me as well.

Thanks in advance,
Lakshmi.

G.K.K wrote:hi,

i want to take backup of particular folder in datastage IBM websphere PX through command line dsexport. but it seems we can take for a particular jobs alone as a backup. but i dont know how to take backup of all the jobs in a particular folder.

E.g: the below shows for particular job to take export,
dsexport /H=192.215.23.19 /U=kamal /P=password /O=1 MT-SEVER/PROJECT1 /xml /job=JOBNAME_KAMAL KAMAL.xml

but i dont know how to take a folder as backup? :( please anyone help me in solving this. pls share this knowledge.

Thanks in Advance
kamal
Thanks,
Lakshmi
lakshmi.vasu
Participant
Posts: 6
Joined: Thu Oct 22, 2009 3:57 am
Location: Bangalore

To get the list of jobnames from a particular folder

Post by lakshmi.vasu »

Hi,

Can you please share the script which is used to get the list of jobnames from a particular folder and then take the export of that folder
Please reply ASAP

Thanks in advance,

kduke wrote:There is a post on how to do this. You need to use Dwn_ExecTCL.exe to run a SELECT statement against DS_JOBS to get the job names in the category. Next you need to use the bat file to export these job ...
Thanks,
Lakshmi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: To get the list of jobnames from a particular folder

Post by chulett »

lakshmi.vasu wrote:Please reply ASAP
Why? What makes this urgent for Kim or anyone else for that matter? :?

Search here for any DS_JOBS query and add a filter on CATEGORY. Any export would need to be done either for the entire project or one job at a time, as has been mentioned here over and over. So you solve your 'folder' conundrum by building a list of all jobs in that category and then exporting them one by one in a loop, appending the results. This too has been discussed many times here.
-craig

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