NOTE: The SAS System stopped processing this step because of errors.
data work.update;
infile invnt;
input Item $ 1-13 IDnum $ 15-19
InStock 21-22 BackOrd 24-25;
Total=instock+backord;
run;
3486 data work.update; 3487 infile invnt; 3488 input Item $1-13 IDnum $15-19 3489 InStock 21-22 BackOrd 24-25; 3490 Total=instock+backord; 3491 run; ERROR: No logical assign for filename INVNT. NOTE: The SAS System topped processing this step because of errors. WARNING: The data set WORK.UPDATE may be incomplete. When this step was stopped there was 0 observations and 5 variables. WARNING: Data set WORK.UPDATE was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds
data work.update;
infile invent;
input Item $ 1-13 IDnum 15-19
InStock 21-22 BackOrd 24-25;
Total=instock+backord;
run;
NOTE: The infile INVENT is: Filename=Z:sasuserinvent.dat, RECFM=V,LRECL=32767,File Size (bytes)=738, Last Modified=02Feb2017:13:50:21, Create Time=19Dec2016:12:49:08 NOTE: Invalid data for IDnum in line 1 15-19. RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---- 1 Bird Feeder LG088 3 20 80 Item=Bird Feeder IDnum=. InStock=3 BackOrd=20 Total=23 _ERROR_=1 _N_=1 NOTE: Invalid data for IDnum in line 2 15-19. 2 6 Glass Mugs SB082 6 12 80 Item=6 Glass Mugs IDnum=. InStock=6 BackOrd=12 Total=18 _ERROR_=1 _N_=2 NOTE: Invalid data for IDnum in line 3 15-19. 3 Glass Tray BQ049 12 6 80 Item=Glass Tray IDnum=. InStock=12 BackOrd=6 Total=18 _ERROR_=1 _N_=3 NOTE: Invalid data for IDnum in line 4 15-19. 4 Padded Hangrs MN256 15 6 80 Item=Padded Hangrs IDnum=. InStock=15 BackOrd=6 Total=21 _ERROR_=1 _N_=4 NOTE: Invalid data for IDnum in line 5 15-19.
proc print data=work.update; run;
Syntax, FREQ procedure:
PROC FREQ DATA=SAS-data-set <NLEVELS>;
TABLES variable(s);
RUN;
|
proc freq data=work.Patients; tables Gender Age; run;
Syntax, MEANS procedure:
PROC MEANS DATA=SAS-data-set <statistics>;
VAR variable(s);
RUN;
|
proc means data=work.Patients; var Age; run;The following figure shows the output for the MEANS procedure. It displays a range of 44 to 242, which clearly indicates that there is invalid data somewhere in the Age column.
data work.clean_data; set work.patients; gender=upcase(Gender); if Gender='G' then Gender='F'; run; proc print data=work.clean_data; run;
data work.clean_data; set work.patients; if empid=3294 then age=65; else if empid=7391 then age=75; run; proc print data=work.clean_data; run;
data work.clean_data; set work.patients; if Age>110 then delete; run; proc print data=work.clean_data; run;