How to Acquire Last Run Date of a job (using dssh)
Posted: Thu Nov 30, 2006 6:25 pm
Hello All,
At my AIX command prompt, I would like to execute a dssh command passing it a SQL statement that will retrieve several things including the last run date of each job and the user who ran the job. I don't know which table to query for the "last ran" info...
So basically I would like a query similar to this that includes the last ran date and user in it:
dssh "SELECT INSTANCE, MODIFIER, DTM, DTC FROM DS_AUDIT"
My ultimate goal is to clean up our repository of jobs. I want to identify jobs that haven't been used in the past x days. Then I want to show that list to the users in a report and let them manually choose what of their own stuff to clean up. We're talking about 100+ jobs and I really don't want to go through it manually (ie, the gui's). For reasons beyond my control, we work on a monthly project schedule. Each month we create a new project and export jobs from old proj and import them into the new one. Eventually old projects roll off and are deleted. Many users create test jobs that get caught up in this import/export happy funball. I want to run a comb through it and pick out the jobs that aren't used so our export files will be smaller and the production environment will be cleaner. Hopefully one day, we'll get development out of production but that is another story also beyond my control....
Any help on dssh commands to generate a report like this would be greatly appreciated. Thanks, Chris
At my AIX command prompt, I would like to execute a dssh command passing it a SQL statement that will retrieve several things including the last run date of each job and the user who ran the job. I don't know which table to query for the "last ran" info...
So basically I would like a query similar to this that includes the last ran date and user in it:
dssh "SELECT INSTANCE, MODIFIER, DTM, DTC FROM DS_AUDIT"
My ultimate goal is to clean up our repository of jobs. I want to identify jobs that haven't been used in the past x days. Then I want to show that list to the users in a report and let them manually choose what of their own stuff to clean up. We're talking about 100+ jobs and I really don't want to go through it manually (ie, the gui's). For reasons beyond my control, we work on a monthly project schedule. Each month we create a new project and export jobs from old proj and import them into the new one. Eventually old projects roll off and are deleted. Many users create test jobs that get caught up in this import/export happy funball. I want to run a comb through it and pick out the jobs that aren't used so our export files will be smaller and the production environment will be cleaner. Hopefully one day, we'll get development out of production but that is another story also beyond my control....
Any help on dssh commands to generate a report like this would be greatly appreciated. Thanks, Chris