Introduction: Developers sometime perform errors throughout SAS program coding these errors are displayed within among the home windows in SAS atmosphere referred to as log window. These errors usually appear throughout the compilation and execution phases of SAS programming. Developers can debug SAS programming errors by understanding processing messages within the SAS log window after which fixing the code automatically.
The errors are known as bugs which are called:
Syntax: Missing semicolon, uninitialized variable and variable not found
Data: Missing values were produced number to character conversion, invalid data, and character area is cut down
Logic: DATA step produces wrong results but no error message.
Referencing the SAS Log window for errors:
The foremost and most significant rule in debugging SAS programs would be to always, follow examining the SAS log. After managing a SAS program many developers turn immediately towards the output window for any default produced report. This really is understandable, although not advisable. It’s possible and sooner to obtain output that appears fine but it may be sometime totally incorrect output report. So frequently examining the SAS log window each time a simple program continues to be run effectively is the only method to know whether a course has run correctly or otherwise. A SAS log consists of majorly 3 kinds of messages: errors, alerts and notes.
If your programmer will get a mistake message in SAS program, programmer knows it because error messages get developers attention by not whatsoever performing employment with any of the bugs. Error messages aren’t quiet, discrete, or subtle those are the noisy, rabble-rousers of SAS messages by preventing a course dead in the tracks. Up until the errors are remedied they do not permit the developers to maneuver further in programming. For instance: ERROR: No CARDS or INFILE statement.
Alerts are less dire than errors. SAS also prints alerts in log window however goes ahead and runs the task anyway. Many developers, including some professional developers, attempt to ignore alerts messages. But it shouldn’t be overlooked because sometimes the situations that lead to alerts truly are harmless in other cases they indicate grave problems, if conflicting, will render the outcomes useless. Developers must always check all alerts to find out if they’re harmless or hazardous using the programming. For instance: WARNING: The information set WORK.SAMPLE might be incomplete. If this step was stopped there have been findings and three variables.
Different error messages are displayed with respect to the error that’s produced, a few of the error messages which are produced are:
Notes would be the most innocuous messages that SAS shows within the SAS log. They just inform the programmer from the status of the program. Notes contain information like the quantity of records put from an exterior file or the amount of findings designed in a SAS data set. They’re significantly important method of catching errors. For instance: NOTE: The information set WORK.SPECIES has 14 findings and three variables.
The missing semicolon:
The latest of SAS developers recognizes that every SAS statement finishes having a semicolon so it’s ironic that certain of the very most common bugs may be the missing semicolon. Some SAS error messages are obvious and clear to see, the hallmark of the missing semicolon is confusion. Missing semicolons frequently create a lengthy stream of baffling messages. For Instance: NOTE: The SAS System stopped processing this task due to errors. WARNING: The information set WORK.INFILE might be incomplete. If this step was stopped there have been findings and three variables.
Uninitialized variable and variable not found:
Both of these related messages intimate a programmer that SAS was not able to locate among the variables. The very first time customers when they see one of these simple messages will most likely question what SAS is leaving comments about. When SAS is not able to locate a variable inside a DATA step, SAS prints the variables uninitialized message. Then SAS produces the variable, sets its values to missing for those findings and runs the information step. For Instance: NOTE: Variable VAR8 is uninitialized.
Number to character conversion:
Should you accidentally mix number and character variables, SAS will convert the information in one type to another, run this program anyway and print the. Printed values note happen to be transformed into an email within the log window. NOTE: Character values happen to be transformed into number values in the places provided by: (Line):(Column).
A SAS programmer must always check their SAS log even if your output looks fine. Notes are simply as essential as error messages and alerts in debugging the programs. Understanding a mistake message and debugging the mistake can’t only assist in acquiring a proper analyses report but in addition helps the programmer to enhance his SAS programming understanding and therefore help him to do better later on.
Clinnovo is really a clinical innovation company. It’s pioneer CRO industry in India. Clinnovo offers professional clinical research course , clinical data management course ,SAS Training and imaging training. Clinnovo continues to be serving different bio-pharma industries around the globe with excellence and quality. To learn more contact at +91 9912868928, 040 64635501