Hi all, could you please correct my input, as I got this message, and no results
Code:
DATA MD1;
INPUT I R RL;
CARDS;
1 1 13
1 2 12
1 3 9
2 1 7
2 2 5
2 3 9
3 1 5
3 2 4
3 3 6
8 1 5
8 2 5
8 3 5
;
PROC ANOVA;
CLASS I R;
MODEL RL = I R;
MEANS I / LSD;
MEANS I /TUKEY;
MEANS I / DUNCAN;
RUN;
LOG
Looking at your log it seems that you have a TAB (='09'x ) delimiter.
change your code to:
DATA MD1;
infile cards dlm='09'x truncover;
INPUT I R RL;
CARDS;
.........
When you get invalid data and stuff like this in the log
81 CHAR 2.3.9 ZONE 30303222222222222222222222222222222222222222222222222222222222222222222222222222 NUMR 29399000000000000000000000000000000000000000000000000000000000000000000000000000 NOTE: Invalid data errors for file CARDS occurred outside the printed range.
the two rows Zone an NUMR represent hex values of ASCII codes. You read the top row as the first digit (zone) and the second row as the second character. 09 in hex is a tab character. The 20 hex you see repeated is a simple space.
If you do not tell SAS that tabs are your delimiter then space is used in the data step and you get errors.
Your editor should have a "save tabs as spaces" setting. Use that and you shouldn't run into this with entered data in a Cards block.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.