I was reminded today of the “Metadata reporting with SAS® software” presentation I did at a SNUG meeting way back in Sep 2007. It seems such a long time ago now, but when I read through it again it is still relevant today. The presentation is mainly about the use of PROC METADATA and the SAS XML Libname Engine (SXLE). It also lists a few metadata reports that I have found useful in the past and were done using this METADATA/SXLE technique:
Sample Report: list of objects currently checked-out (locked) by SAS DI Studio users
Sample Report: reverse chronological list of all check-ins performed by SAS DI Studio users, with links to review the jobs and tables associated with each check-in
Sample Report: list of SAS DI Studio jobs that need to be re-deployed for scheduling
Sample Report: comparison of SAS DI Studio jobs from 2 repositories to identify those that need to be promoted
The presentation is available in PDF format as slides-only as well as slides-with-notes that provide a little more information. The slides show code fragments and so here are a couple of complete, albeit basic, examples that can be used as starting points for further work:
- ProcMetadataSample1.sas: this is a basic example to extract and print user information (id, name, title and email address) for any user whose name begins with ‘Paul’ (using XMLSELECT)
- ProcMetadataSample2.sas: extract group information only for those groups that have a user member whose user name begins with ‘SAS’ – this is an example of XMLSELECT filtering based on associations
It was around this time that I had the idea to pursue metadata reporting by creating plug-ins for the SAS Management Console using Java. This ultimately resulted in the creation of our Metacoda Security Plug-ins product used to review and report on security metadata.
Hi Paul!
great to see you at SGF. Quick question, do you have an example of a report for details on all scheduled jobs? the schedule manager plugin is pretty light. Ideally, we would want to see all of the scheduled jobs by user, periodicity (daily, weekly, etc.), last executed, next run, job name, scheduled by, scheduling server,
Hi Greg,
It was great to see you at SASGF too. I heard very good things about your admin workshops.
I don’t have a detailed report on jobs, but if I do write one down the track I’ll let you know. The ones in the presentation screenshots were simple reports: one on jobs that needed to be redeployed because the job was newer than the already deployed code; the other just compared the timestamps on jobs in different environments to see what might need to be promoted. For the report you want, some of the things you should be able to get out of metadata, but I think you would also need to reach into the scheduling server for some of the other information. I haven’t looked for any APIs on that as yet so not sure how accessible that extra info would be.
Cheers
Paul
Dear Paul,
I was looking for a report for details on all scheduled jobs (as Greg had posted ).
Could you help me if such info can be captured now. I was specifically looking for last run time and queue detail (priority queue, normal queue).
Any useful information will be of great help to me. Thank you.
-Mark
Hi Mark,
If you look at the deployed flow object in metadata (JFJob model type) you’ll find an associated Property object (through the Properties association) with a name of QUEUE. It’s DefaultValue attribute will be the name of the queue (priority, normal etc). Other associated metadata can give you details of the schedule such as Calendar, hours, minutes etc.
For the last run time, exit status etc, you’ll need to look into the scheduler itself (such as with the Platform jhist command). That run history is not available in metadata as far as I know.
Cheers
Paul