Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-02-06
3
Medium Priority
?
561 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 1000 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 1000 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

824 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