I have a requirement in which I need to list down all the dependencies from a scheduled job on metadata.
These dependencies are found on the Dependency tab of a job property in Schedule Manager.
Would also love to read all other attributes from tab General, Attributes and Job Properties.
Can anyone guide me on how to retreive this for a given job or all jobs in a tabular format.
I wrote a short presentation in 2007 about Metadata Reporting with SAS Software that included a couple of sample programs that use SAS proc metadata to query metadata, read the XML response into a SAS table, using the SAS XML Libname Engine (SXLE), that can then be used in SAS reports. That might help you get started. You might also notice the presentation included a couple of screenshots showing sample reports on jobs.
For more information on metadata reporting see the SAS documentation, specifically:
Great addition @PaulHomes,
as I previously mentioned, SAS Metadata querying is a great solution (and I would say, the best one), althougth I believe it is a bit advanced topic, specially for a newcomer to the SAS metadata. It is often a challenge to me 🙂 @aj34321, I subscribe to what was proposed by Paul: give a try to query the Metadata, and if you feel yourself blocked, below you have a good alternative.
I would agree with @JuanS_OCS in that if the information you need is readily available in those Platform Process Manager / LSF files then I would choose that method. Pulling basic attributes out of metadata using the SAS Open Metadata Interface is reasonably straightforward, but once you have to start chasing object associations, if gets complex very quickly. The SAS metadata model is fine grained and rich but it's a very steep learning curve and I wouldn't underestimate the amount of time/effort required to go beyond simple queries.
about your question regarding the XML, you can find it under your Process Manager folder. Under this folder, you can find /work/events/js.events. This file describes all the events that will be triggered in your system. Dates are on an integer format, or float, but the interesting fact of this file is that it will give you a good overview of what is scheduled in your system,
Additionally to this file, under your LSF_Shared folder, you can find the folder /work/your_cluster/logdir/ and inside this folder, the files lsb.events and lsb.acct.
In opposition to the previous file, these are not an XML file, but a space separated file. These files are interesting because they includes very detailed onformation of every job that has run on your LSF system as: user, resources, host, job, full command (log, program, etc), and execution times, and other details. Those last files you can just import them into Excel or a SAS dataset, to be processed.
Personally I am more in favour to obtaining the information through the metadata API using SAS since this is were basically your information resides. However it will indeed take some time to learn and find your way, although once found it surely gets more easier and will open a great way of also accessing and reporting on the other information that can be found in the SAS metadata.
I work for a dedicated SAS Partner and we have developed a tool that provides real time information on flows and jobs that are registered and submitted. The information is obtained from the metadata using base SAS and SAS SCL code.It provides information on history but also real time information while the flow is running.
We, unfortunately, only have a video giving an impression of an earlier release of the tool which you can find here.
The latest version is available on GitHub and is shared under the GNU 3 License.
Feel free to check it out.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.
Find more tutorials on the SAS Users YouTube channel.