Page 1 of 1

Getting a list of job name and start time

Posted: Mon Jun 17, 2013 8:59 pm
by tkbharani
I am working on to get a list of DataStage Job/Sequence name whose start time is >= April 2013. Repository has jobs/sequence which are running daily and some which are decommissioned(Not running, but exist). I am in process of identifying which have run for past 2 months.

What we did-
1. Using "dsjob -ljobs" command get list of jobs
2. Loop through all listed jobs again to get multiple instance job names with instances using -linvocations
3. Loop through each job to get information on start time etc using "dsjob -jobinfo"
4. Write script to filter only Job name, start time

Is there a better way of getting this information using LOGGING_CATEGORY1466CB5F or DS_JOBS of UV. Please advice

Posted: Mon Jun 17, 2013 11:13 pm
by ArndW
I'm not sure of how you would define 'better', since you've got something completed which is running.

You could write a small BASIC routine or function using defined Routine calls which only needs to loop through all the jobs once and would be more efficient, but it would return the same values as what you've alread completed.

Posted: Mon Jun 17, 2013 11:30 pm
by tkbharani
I thought, if xmeta is storing start time of each jobs, then it is matter of writing select SQL pointing to xmeta LOGGING table. Is there a way to fetch same information(Jobname, StartTime) from xmeta tables ?

Posted: Mon Jun 17, 2013 11:43 pm
by ArndW
The DataStage API calls are documented, xmeta is not. While there is a way to do it, it might not work in the future and I'd stick with documented methods.