Solved

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

Posted on 2013-02-06
3
542 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Read about achieving the basic levels of HRIS security in the workplace.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

862 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now