data tom;
length ID $ 3 Name $ 15;
input $ Score1-Score3 Name $;
datalines;
1 90 95 98 tom
2 78 77 75 ram
3 88 91 92 sham
;
proc print noobs;
proc contents data=tom;
run;
ID is missing in your input statement.
You should always make clear step boundaries by using a run statement, see Maxim 49.
ID is missing in your input statement.
You should always make clear step boundaries by using a run statement, see Maxim 49.
data tom;
length ID $ 3 Name $ 15;
input ID $ Score1-Score3 Name $;
datalines;
1 90 95 98 Tom
2 78 77 75 Ram
3 88 91 92 Sham
;
proc print noobs;
proc contents data=tom;
run;
Why is the observation length 48 in the output? Thanks for correcting my code:) @Kurt_Bremser
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.