Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Picture
Programming Tips 8


Pay attention to the following when using the INPUT function:

1. Use the Right Informat

Converting a variable from character to numeric is just a matter of finding the right informats.

Below is the list of informats that are commonly used:
Picture

You can also look up the list of informats on the SAS official website.


2. Invalid Data Error

When using the Input function, you might encounter a note from the Log tab: 

NOTE: Invalid argument to function INPUT at line 60 column 9.
Picture

This is often due to an incomplete data point from the variable.

Example
Picture

The Date variable above contains an incomplete date (which is very common by the way). 

When converting the variable into numeric, SAS will show a note regarding the Invalid data.

Although this is not considered an error message, it is a good programming practice to clean it up before continuing your program.
Next
Already a member? Go to member's area.