SASCRUNCH TRAINING
  • Home
  • Online Courses
    • Practical SAS Training Course for Beginners
    • SAS Base Certification Training Course
    • Proc SQL Course
    • SAS Project Training Course
    • Logistic Regression (Credit Scoring) Modeling using SAS
  • Services
    • The Ultimate Job Search Automation Services
    • Statistical Consulting
    • SAS Assignment Help
    • Data Import Services
    • Data Manipulation and Reporting Services
  • Articles
    • Get Started >
      • 18 Free Resources to Help You Learn SAS
      • How to Install SAS Studio
      • How to Learn SAS Fast
    • Data Import >
      • Importing Excel Spreadsheet
      • Importing CSV Files
      • Importing Text Files
    • SAS Functions >
      • CAT, CATT, CATS, CATX Functions
      • If-Then-Else statement
      • TRIM Function
      • STRIP Function
      • YEAR, MONTH, DAY Functions
      • Compress Function
      • Do-Loop
      • SCAN Function
      • LIKE Operator
      • INDEX Function
    • Data Manipulations >
      • The Ultimate Guide to Proc SQL
      • Proc Datasets
      • Dictionary Tables
      • Dealing with Missing Values
      • Proc Compare
      • Proc Transpose
      • RETAIN Statement
      • SAS Formats
      • SAS Arrays
    • Statistical Analysis >
      • Proc Means
      • Proc Freq
      • Proc Tabulate
    • Informational Interviews >
      • Senior Recruiter at a Fortune 500 Retail Company
      • Manager, Non-profit Health Services Research
      • HR Manager
      • Quantitative Analyst
  • In-class Training
    • SAS Training for Job Seekers
  • Guest Lecture
  • Sample Resume
  • About us
  • Contact Us
Master SAS
​in 30 Days
Start your Free training now!
x
Get Certified as a SAS Base Programmer
28
Training Modules
200+
Exam Questions
100%
Instructor Support
100%
Pass
​Guarantee
Start your free training now
 
 
Lesson 1.3: What if there is an error?
IMPORTANT! We have recently updated our training materials. Check out the latest free training here. 

Typos, spelling mistakes or programming errors cannot be avoided in any programming language. The place to check any type of errors is in the ‘Log’ window. 

This example illustrates how to check errors in the log window:

Example

DATE SASCrunch;
    INPUT name $ dept $;
*   DATALINES;
    John Sales
    Mary Acctng
    ;
RUN;

There are two errors in the codes above (highlighted in red!):
  1. DATA was misspelled as 'DATE'. 
  2. DATALINES statement was commented out. In SAS, any statement that starts with the asterisk (*) will be seen as ‘comments’ by SAS and it will not be read.
Picture

As a result, SAS shows 2 error messages and 3 warning messages in the log window. Any error message will be highlighted in red and warning message (a less severe problem determined by SAS) will be highlighted in green. It is very helpful to keep a habit of checking the log window whenever a set of codes is run.

DONE! You have learned to check programming errors in SAS.
Next
Previous

    Have a Question?

Submit
 

Master SAS in 30 Days

Start your Free training now!
Copyright © 2012-2017 SASCrunch.com All rights reserved.
  • Home
  • Online Courses
    • Practical SAS Training Course for Beginners
    • SAS Base Certification Training Course
    • Proc SQL Course
    • SAS Project Training Course
    • Logistic Regression (Credit Scoring) Modeling using SAS
  • Services
    • The Ultimate Job Search Automation Services
    • Statistical Consulting
    • SAS Assignment Help
    • Data Import Services
    • Data Manipulation and Reporting Services
  • Articles
    • Get Started >
      • 18 Free Resources to Help You Learn SAS
      • How to Install SAS Studio
      • How to Learn SAS Fast
    • Data Import >
      • Importing Excel Spreadsheet
      • Importing CSV Files
      • Importing Text Files
    • SAS Functions >
      • CAT, CATT, CATS, CATX Functions
      • If-Then-Else statement
      • TRIM Function
      • STRIP Function
      • YEAR, MONTH, DAY Functions
      • Compress Function
      • Do-Loop
      • SCAN Function
      • LIKE Operator
      • INDEX Function
    • Data Manipulations >
      • The Ultimate Guide to Proc SQL
      • Proc Datasets
      • Dictionary Tables
      • Dealing with Missing Values
      • Proc Compare
      • Proc Transpose
      • RETAIN Statement
      • SAS Formats
      • SAS Arrays
    • Statistical Analysis >
      • Proc Means
      • Proc Freq
      • Proc Tabulate
    • Informational Interviews >
      • Senior Recruiter at a Fortune 500 Retail Company
      • Manager, Non-profit Health Services Research
      • HR Manager
      • Quantitative Analyst
  • In-class Training
    • SAS Training for Job Seekers
  • Guest Lecture
  • Sample Resume
  • About us
  • Contact Us