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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1475 views
  • 2 likes
  • 3 in conversation