This is a first for me and I confused about why sas is giving me the following log message
NOTE: LOST CARD.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
Here is the code I wrote:
data work.pt4;
input education $ region $ response $ count;
cards;
college west disagree 18
college west neutral 15
college west agree 48
college midwest disagree 13
college midwest neutral 19
college midwest agree 21
college east disagree 28
college east neutral 28
college east agree
hs west disagree 46
hs west neutral 23
hs west agree 24
hs midwest disagree 22
hs midwest neutral 20
hs midwest agree 21
hs east disagree 48
hs east neutral 18
hs east agree 23
lesshs west disagree 13
lesshs west neutral 15
lesshs west agree 28
lesshs midwest disagree 15
lesshs midwest neutral 16
lesshs midwest agree 17
lesshs east disagree 15
lesshs east neutral 17
lesshs east agree 24
;
run;
Can someone set me straight? I am assuming that it is a simple problem but I have never encountered it before.
It is happening for this line of data ...
college east agree
Your INPUT statement is looking for 4 variables, but there are only 3 on this line. So the INPUT statement goes to the next line, looking for a value for COUNT.
It is happening for this line of data ...
college east agree
Your INPUT statement is looking for 4 variables, but there are only 3 on this line. So the INPUT statement goes to the next line, looking for a value for COUNT.
Thanks so much! I thought I was losing my mind
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: