How to remove many DataStage jobs automatically?

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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Do you have a list of job numbers in a file that you can start with?

Also, the "DELETE VOC xxxx" is not correct, you would want to "DELETE.FILE xxxx" for the files, and then just the record from DS_JOBS.

I can't check now, but I think that one of the builtin menu items will remove associated files if the DS_JOB job name entry is missing, so you might just have to edit the DS_JOBS file.

Note that playing directly with this file, or any other VOC items, is dangerous and one or more backups prior to starting are to be recommended.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In addition to what Arnd suggested, remember that stages, links, containers and annotations are stored in DS_JOBOBJECTS, so you need to delete entries from that table, ideally before removing the entry from DS_JOBS.

I haven't tried this but, knowing that you can delete a job in Director client, can you delete multi-selected jobs using Director?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is it about 1,111 jobs out of a total of 1,150 jobs? Both Ray and I think that it can be fast and efficient to select the jobs to delete in the director or to use the search functionality in the designer to get a list of jobs and then merely hit the DELETE button and go home while the jobs are deleted.

Since the manual deletion of jobs involves several files and tables it is prone to errors and should be avoided if at all possible.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you select the 250 valid jobs using dssearch or other means in the designer? If so, export them, delete everything in the project, then re-import the jobs.
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

I have a list of these 250 jobs, manually generated. Only a list, no .dsx.
There is no name 'pattern' I can use to identify them. As it was mentioned, I made a list based on the main job Sequences, manually.

Thanks in advance,
Joyce A. Recacho
São Paulo/SP
Brazil
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could script the exports that Arnd mentioned, backup the entire project, then delete and re-create the projects and import from the exported jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

With your list, you could export your jobs (dscmdexport) and then clean up the project before re-importing or create a new project with just the exported jobs in it.
Post Reply