BookmarkSubscribeRSS Feed
Djones4822
Obsidian | Level 7

I have an EG script that I've scheduled to run every night.

 

The other night, one of the source tables was removed by a user causing the EG script to fail. I did not realize this until I had opened the report in VA. 

 

Is there a way to get outputs of the runlog? Specifically, I would love a log that states the step, whether it was successful or not, and if not the accompanying error log. Ideally, I would like this saved somewhere after every run

 

Is that possible? 

4 REPLIES 4
Kurt_Bremser
Super User

Save the code to a .sas program file, and run that from the scheduler with the sasbatch.bat or sasbatch.sh. Add a -log option, and check for the return code.

Djones4822
Obsidian | Level 7

I'm not sure this would work for me as we don't have a local SAS executable installed on my machine. I was under the impression that EG worked because it connects to the host machine where the code is executed. 

 

Am I mistaken? Is there some way for me to execute sas code from my machine? 

SASKiwi
PROC Star

I suspect EG processes on a remote SAS server in your case. If so, then I would highly recommend checking out SAS Management Console and its scheduling capabilities. If you aren't familiar with SMC I suggest you talk to your SAS administrator about scheduling using SMC. It is way more reliable than EG for scheduling and it creates log and output files automatically.

Kurt_Bremser
Super User

@Djones4822 wrote:

I'm not sure this would work for me as we don't have a local SAS executable installed on my machine. I was under the impression that EG worked because it connects to the host machine where the code is executed. 

 

Am I mistaken? Is there some way for me to execute sas code from my machine? 


Save the code to the server and schedule it there. Either use SMC and SAS built-in scheduling, or use your company-wide scheduling system (preferred, if one exists).

 

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
  • 4 replies
  • 1122 views
  • 2 likes
  • 3 in conversation