Solved

How to checking SAS code for errors after running the code?

Posted on 2013-02-06
3
554 Views
Last Modified: 2013-02-14
I would like to write "0" to check.txt file if my SAS program completes successfully (with no errors). What should I add at the end of my SAS program to make this happen?
0
Comment
Question by:labradorchik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
Aloysius Low earned 250 total points
ID: 38862287
you can use the SYSERR global variable to determine if there's any error. anything greater than 0 is an error.
0
 
LVL 11

Assisted Solution

by:theartfuldazzler
theartfuldazzler earned 250 total points
ID: 38862769
Hi

As a general rule, I only worry if the SYSERR is over 6... I get a lot of "Warnings" in my code - that actually mean nothing... and the code runs fine.  

I would use SYSERR > 6 rather...

See the following link for details on the errors - and what they mean:

http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000208995.htm
0
 

Author Comment

by:labradorchik
ID: 38890558
Thank you both very much for your comments and references!
I checked errors in SAS program assigning 0 if no errors in SAS log and 1 if there are errors to a .txt file and then checked that .txt file in the script.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question