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
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 25. 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.