Architecting, installing and maintaining your SAS environment

List all attributes from the scheduled job.

Reply
Frequent Contributor
Posts: 76

List all attributes from the scheduled job.

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

 

Trusted Advisor
Posts: 1,326

Re: List all attributes from the scheduled job.

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

Frequent Contributor
Posts: 76

Re: List all attributes from the scheduled job.

Posted in reply to JuanS_OCS

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

Trusted Advisor
Posts: 1,326

Re: List all attributes from the scheduled job.

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 Smiley Happy

Frequent Contributor
Posts: 76

Re: List all attributes from the scheduled job.

Posted in reply to JuanS_OCS

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.

PROC Star
Posts: 426

Re: List all attributes from the scheduled job.

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
Trusted Advisor
Posts: 1,326

Re: List all attributes from the scheduled job.

[ Edited ]
Posted in reply to PaulHomes

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 Smiley Happy @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. 

 

 

PROC Star
Posts: 426

Re: List all attributes from the scheduled job.

Posted in reply to JuanS_OCS

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.

Trusted Advisor
Posts: 1,326

Re: List all attributes from the scheduled job.

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

 

Frequent Contributor
Posts: 87

Re: List all attributes from the scheduled job.

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

Ask a Question
Discussion stats
  • 9 replies
  • 439 views
  • 10 likes
  • 4 in conversation