Export jobs via Windows API

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pxbaker
Participant
Posts: 3
Joined: Thu Jan 05, 2006 11:22 am
Location: UK

Export jobs via Windows API

Post by pxbaker »

I need to export all jobs into individual files on a regular automated basis.
Is there an easy way to to this?

Can I use the API's that are exposed in Windows to loop through the collection of jobs in a project and export each one into a seperate export file?

Any ideas.

( Sorry if its been covered before, but I couldnt find anything )
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

There are two ways:

one is to export all jobs and use a thirdparty Jobsplitter programm or Tool.

Another is to use a Windows third party tool as for example compilewitch.
Wolfgang Hürter
Amsterdam
Andal
Participant
Posts: 124
Joined: Thu Dec 02, 2004 6:24 am
Location: Bangalore, India

Post by Andal »

I hope there wont be need for APIs here.

You can write a batch file to export the jobs into individual files. And you can schedule the batch file using Windows Scheduled Tasks.

You can have a sample code Here
Rgds
Anand
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Create a bat file that executes dscmdexport (maybe renaming yesterday's DSX file first). Execute the bat file via AT.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pxbaker
Participant
Posts: 3
Joined: Thu Jan 05, 2006 11:22 am
Location: UK

Post by pxbaker »

Thanks for the suggestions.

The bat file seems the easiest option and the one we first considered, but the file would need to be maintained with a never ending list of jobs and schedules, currently around 400 per project.

We want to avoid any maintenance so we can be assured were not missing anything.

Thanks
Pat
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

HI,
You can get the total list of the job (if update every time) in runtime.
Many option available, somting like dsjob -ljobs... Select NAME from DS_JOBS...
View this to gain idea how to get the total number of jobs in a project.

-Kumar
Andal
Participant
Posts: 124
Joined: Thu Dec 02, 2004 6:24 am
Location: Bangalore, India

Post by Andal »

You dont have to maintain the job list in a seperate excel. You can get the list of jobs in a project by using "dsjob -ljobs", and loop it .
Rgds
Anand
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

HI,

Use the for loop in the shell scripting language.

In a windows BAT file there could be a similar functionality

Regards
Sreeni
Post Reply