javascript
Brief description  about Online courses   join in Online courses
View Rahul  Sharma 's Profile

Writing first SAS Program and the Error

I have Jusy Started writing my first SAS Program in Software after reading the Notes given in Tutorial and watching the Introductory Video but the Error Occuring after running the Program is as " (1) Statement is not Valid or it is used out of Proper Order (2) The Data Set work.weight_club may be incomplete.when this step was stopped there were 0 observations and 5 variables. warning data set work.weight_club was not replaced because this step was stopped

I am getting these 2 Errors. Kindly guide me
Asked by Rahul Sharma | Sep 23, 2014 |  Reply now
Replies (2)
View SAS Consultant 's Profile
Hi Rahul find code below and write in your editor window it will work fine.

Code:

data weight_club;
input IdNumber 1-4 Name $ 6-24 Team $ StartWeight EndWeight;
Loss=StartWeight-EndWeight;
datalines;
1023 David Shaw red 189 165 5
1049 Amelia Serrano yellow 145 124 5
1219 Alan Nance red 210 192 5
1246 Ravi Sinha yellow 194 177 5
1078 Ashley McKnight red 127 118 5
;
run;
proc print data=weight_club;
run;

Log:

227 data weight_club;
228 input IdNumber 1-4 Name $ 6-24 Team $ StartWeight EndWeight;
229 Loss=StartWeight-EndWeight;
230 datalines;

NOTE: The data set WORK.WEIGHT_CLUB has 5 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.01 seconds


236 ;
237 run;
238 proc print data=weight_club;
239 run;

NOTE: There were 5 observations read from the data set WORK.WEIGHT_CLUB.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
Sep 30, 2014
View SAS Consultant 's Profile
Hi Rahul,

Hope you got cleared with your doubt.

for more doubt keep asking here by posting your question also.
Sep 30, 2014