BookmarkSubscribeRSS Feed
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

I have three jobs
JOB1
JOB2
JOB3

All three jobs running N number times for different data. If JOB1 abended with errors. I am not interested to run JOB2 and JOB3. I would like to check job status after finishing my job JOB1, JOB2 and JOB3.


can you please help me to provide any command available for STATUS check in DI 3.4?

Thanks in advance.

Sreenivasa
5 REPLIES 5
LinusH
Tourmaline | Level 20

How are these jobs scheduled?

If you are using Windows Task Scheduler, UNIX cron or LSF/Platform JS, you can build job dependencies in SAS Management Console's Scheduling plug-in.

Data never sleeps
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

I am not using any Schedular tools like Windows Task Scheduler, UNIX cron or LSF/Platform.

I am running the jobs using %include command

%include job1

%include job2

%include job3

All jobs put it in DO loop to run N number of times.

How can i check job status? Could you please clarify

Sreenivasa
LinusH
Tourmaline | Level 20

If you are in a Windows or UNIX environment, I suggest that you take look at the functionality offered in SMC, it has what you are asking for.

if you still want to stick to using %include, you can test the &job_rc macro variable after each job.

Data never sleeps
SYN
Obsidian | Level 7 SYN
Obsidian | Level 7

Thank you LinusH.  I would like to use %include.

How can we use &JOB_RC to get the status of job which is getting called by %include?

should we call rcset(%syslibrc) ?

If it so how does it works i am not getting understand.

Could you please clarify?

Sreenivasa
LinusH
Tourmaline | Level 20

If &job_rc <> 0 you probably want something to happen, like aborting the SAS session?

The neatest way is to build a macroto do the test and the appropriate action, and call this macro after each %include.

Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1731 views
  • 0 likes
  • 2 in conversation