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
Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

808 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