script to delete jobs

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

rtan
Participant
Posts: 4
Joined: Wed May 17, 2006 9:24 pm

script to delete jobs

Post by rtan »

Hi,

I want to write a script that, among other things, deletes a number of jobs from a project. Is this possible?

ta.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There is no command line mechanism to delete jobs. Curiousity forces me to ask - why do you think you need to do something like this? :?
-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 »

Yeah, why? I can't think of any reason for wanting to do that. The number of keystrokes required to create the script is probably more than the number of mouse clicks required to delete the jobs using the GUI.
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

Post by chulett »

Perhaps it depends on what the 'among other things' things are?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Is by any chance, that you guys have decided not to give solutions with DS internal files. :wink:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I for one feel that would be a Very Bad Idea and should not be the kind of advice we hand out here willy-nilly. More than likely, all that will result of it would be a corrupted repository.
-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 »

Let's await rtan's answer to the "why" question.

Sure it can be done by hacking the Repository tables (not sure yet how to do this via the Metadata Delivery Service in Hawk, though). But this is definitely a high risk "solution" in inexperienced hands. What if the wrong piece is accidentally deleted? Do you force an export beforehand so that pieces can be recovered? Already you're taking more time than using the GUI client to delete jobs.

Further, using the GUI client means that DS_AUDIT is updated, so that there's a record of by whom and when the object was deleted. Would that capability need to be included in the script?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I agree with Ray but this has been posted already.
Mamu Kim
rtan
Participant
Posts: 4
Joined: Wed May 17, 2006 9:24 pm

Post by rtan »

Hi all,
i'd like to automate the process of deleting an existing build and importing a full build. At the moment, I have a batch script which extracts a full build from VSS and imports it into DSManager. However, before this happens I have to manually delete the jobs/folders from manager. So to answer the 'why' question - it's purely to have an automated process for build migration.
thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Why not version builds at a project level? For every major build, start a new project. For minor patch migrations, just overlay.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Post by sud »

rtan wrote:Hi all,
i'd like to automate the process of deleting an existing build and importing a full build. At the moment, I have a batch script which extracts a full build from VSS and imports it into DSManager. However, before this happens I have to manually delete the jobs/folders from manager. So to answer the 'why' question - it's purely to have an automated process for build migration.
thanks
But simply importing through your script will overwrite everything which should suit your purpose. If you are talking about removing all the instances of each job you just need to force compile all jobs.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Beat me to it!! All you need to do then is delete those few jobs, if any, that are not in the new build. You will be able to generate a list of these from VSS.

I continue to recommend a manual process, or hire an expert (who is cognizant of the dangers) to create your script. Your support provider will be able to source one, IBM can provide these services, some of the posters here can also do so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Peace
Participant
Posts: 11
Joined: Mon Jun 05, 2006 9:21 pm

Post by Peace »

May I know what is VSS???

ray.wurlod wrote:Beat me to it!! All you need to do then is delete those few jobs, if any, that are not in the new build. You will be able to generate a list of these from VSS.

I continue to recommend a manual ...
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Visual Source Safe.
Mamu Kim
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Post by sud »

ray.wurlod wrote:

I continue to recommend a manual process, or hire an expert (who is cognizant of the dangers) to create your script. Your support provider will be able to source one, IBM can provide these services, some of the posters here can also do so.
And so they won't discuss the steps to do it. Cuz u kn, u gotta burn ur fingers to learn this stuff. For the bravehearts, I will urge em to use the long weekend :twisted: :twisted: Take a backup and then do ur evil stuff and when u r convinced that u have blown up everything ... revert.

:idea: Provided u r a sudoer on the box ofcourse.
If you are caught in the act ... voila, ur fingers will be intact. Ur a** will be in line of course. :lol:
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Post Reply