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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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: