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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.