Help using Base SAS procedures

Error handling in batch mode

Reply
Occasional Contributor
Posts: 19

Error handling in batch mode

Hi,
I've put some SAS programs in a .bat file that runs every day. At the end of the process SAS send me an email with the log file. With which automatic macro variable could I check if there was an error in the execution? In this manner I'd avoid receiving the whole log file.

Thank you
Respected Advisor
Posts: 4,173

Re: Error handling in batch mode

Hi

Wouldn't this just be to collect the highest exit code of the SAS programs you're submitting (as part of the dos script).

As I understand it each of these programs is submitted in batch (within this .bat file). So these are a couple of child processes and there won't be a common SAS macro variable around as every single job runs in its own environment.

Alternatively you could use the Windows Task Scheduler or LSF (if installed at your site) to handle job execution and error conditions.

HTH
Patrick
Ask a Question
Discussion stats
  • 1 reply
  • 173 views
  • 0 likes
  • 2 in conversation