Page 1 of 1

backup of folder using dsexport command

Posted: Sun Feb 15, 2009 11:32 pm
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

Posted: Mon Feb 16, 2009 8:07 am
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.

Posted: Mon Feb 16, 2009 8:39 am
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.

Posted: Mon Feb 16, 2009 8:53 am
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:

Posted: Mon Feb 16, 2009 6:26 pm
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.

REG:backup of folder in DatastagePX

Posted: Mon Feb 16, 2009 10:38 pm
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?

Posted: Tue Feb 17, 2009 12:26 am
by richdhan
Hi,

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

--Rich

Posted: Tue Feb 17, 2009 12:36 am
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

Posted: Tue Feb 17, 2009 12:47 am
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

Posted: Tue Feb 17, 2009 6:10 am
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.

Posted: Tue Feb 17, 2009 2:44 pm
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?

How to export multiple jobs automatically throu command line

Posted: Mon Feb 22, 2010 2:44 am
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 ...

Re: backup of folder using dsexport command

Posted: Mon Feb 22, 2010 3:07 am
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

To get the list of jobnames from a particular folder

Posted: Mon Feb 22, 2010 5:48 am
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 ...

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

Posted: Mon Feb 22, 2010 8:53 am
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.