BookmarkSubscribeRSS Feed
aj34321
Quartz | Level 8

Hello Experts,

 

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. 

 

 

Thanks,

 

Anil

 

9 REPLIES 9
JuanS_OCS
Amethyst | Level 16

Hello @aj34321,

 

a question. Where do you schedule your jobs? To your Operating system, to LSF/Process Manager or some other scheduler?

 

Thanks in advance,

Juan

aj34321
Quartz | Level 8

SAS is installed on Linux and all jobs are deployed on LSF/Platform Manager.

JuanS_OCS
Amethyst | Level 16

Did you checked the xml from your jobs in the Process Manager itself? They generally give a lot of information, although not sure it they provide all what you want.

And good thing of XMLs, you can process them easily 🙂

aj34321
Quartz | Level 8

Hi.. I'm very new to Metadata querying / reporting hence i'm not sure how this XML can be retreived. If you can guide the steps would be really helpful. Thanks.

PaulHomes
Rhodochrosite | Level 12

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:

  1. SAS 9.4 Language Interfaces to Metadata
  2. SAS 9.4 Open Metadata Interface: Reference and Usage
  3. SAS 9.4 Metadata Model: Reference
JuanS_OCS
Amethyst | Level 16

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. 

 

 

PaulHomes
Rhodochrosite | Level 12

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.

JuanS_OCS
Amethyst | Level 16

Hello @aj34321,

 

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.

 

https://www.ibm.com/support/knowledgecenter/en/SSETD4_9.1.2/lsf_config_ref/lsb.acct.5.html

https://www.ibm.com/support/knowledgecenter/en/SSETD4_9.1.2/lsf_config_ref/lsb.events.5.html

 

Resa
Pyrite | Level 9

Hi @aj34321,

As can be read from the replies from both @JuanS_OCS and @PaulHomes there are several ways to obtain the information.

 

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.

 

Kind regards,

--Resa

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

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.

Discussion stats
  • 9 replies
  • 3041 views
  • 13 likes
  • 4 in conversation