Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS input question

Status
Not open for further replies.

ziplok

Technical User
May 13, 2007
1
US
When inputting column data such as:

data test;
input num 1;
datalines;
2
3
4
;

only decimal points are written to my work file under variable num. Data is written corectly if I don't use the column number in the input statement.
Confused. New to SAS.
 
Decimal or dot as we sas programmers call that character, is used by the SAS system as a missing value. When you tell SAS to import the data starting at column 1, when SAS doesn't find data it puts the missing flag in its data vector. If you need to use column numbers (for what ever reason you may have) try increasing the column number. IN your example it looks like your data starts in column 7.

Hope this has helped you,
Klaz
 
Get rid of the leading spaces in your data lines and it'll work.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top