data sasuser.admitfee;
set sasuser.admit;
run;
proc prin data=sasuser.admitfee;
var id name actlevel fee;
run;
9231 data sasuser.admitfee; 9232 set sasuser.admit; 9233 run; NOTE: There were 21 observations read from the data set SASUSER.ADMIT. NOTE: The data set SASUSER.ADMITFEE has 21 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 9234 proc print data=sasuser.admitfee; 9235 var id name actlevel fee; 9236 run; NOTE: There were 21 observations read from the data set SASUSER.ADMITFEE. NOTE: PROCEDURE PRINT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds
Syntax, PUTLOG statement
PUTLOG 'message';
Note: You can precede your message
text with WARNING, MESSAGE, or NOTE to better identify the output
in the log.
|
Variable
|
Description
|
Debugging Use
|
---|---|---|
_N_
|
The number of times
the DATA step iterated
|
Displays debugging messages
for a specified number of iterations of the DATA step
|
_ERROR_
|
Initialized to 0, set
to 1 when an error occurs
|
Displays debugging messages
when an error occurs
|
data work.grades; infile class; input Name $ Score1 Score2 Score3 Homework; Homework=Homework*2; AverageScore = MEAN(Score1 + Score2 + Score3 + Homework); if AverageScore < 70; run;
NOTE: The infile CLASS is: Filename=C:UsersMy SAS Files9.4class.dat, RECFM=V,LRECL=32767,File Size (bytes)=328, Last Modified=04Dec2017:11:01:52, Create Time=04Dec2017:10:55:21 NOTE: 4 records were read from the infile CLASS. The minimum record length was 80. The maximum record length was 80. NOTE: The data set WORK.GRADES has 0 observations and 6 variables.
PUTLOG Name= Score1= Score2= Score3= Homework= AverageScore=;
10243 data work.grades; 10244 infile class; 10245 input Name $1-7 Score1 Score2 Score3 Homework; 10246 Homework=Homework*2; 10247 AverageScore = MEAN(Score1 + Score2 + Score3 + Homework); 10248 PUTLOG Name= Score1= Score2= Score3= Homework= AverageScore=; 10249 IF AverageScore < 70; 10250 run; NOTE: The infile CLASS is: Filename=C:UsersDocumentsMy SAS Files9.4class.dat, RECFM=V,LRECL=32767,File Size (bytes)=328, Last Modified=04Dec2017:11:01:01, Create Time=04Dec2017:10:55:21 Name=LINDA Score1=53 Score2=60 Score3=66 Homework=84 AverageScore=263 Name=DEREK Score1=72 Score2=64 Score3=56 Homework=64 AverageScore=256 Name=KATHY Score1=98 Score2=82 Score3=100 Homework=96 AverageScore=376 Name=MICHAEL Score1=80 Score2=55 Score3=95 Homework=100 AverageScore=330 NOTE: 4 records were read from the infile CLASS. The minimum record length was 80. The maximum record length was 80. NOTE: The data set WORK.GRADES has 0 observations and 6 variables.
data work.grades;
infile class;
input Name $1-7 Score1 Score2 Score3 Homework;
Homework=Homework*2;
AverageScore = MEAN(Score1, Score2, Score3, Homework);
if AverageScore < 70;
run;
proc print data=work.grades;
run;
data sasuser.admitfee; set sasuser.admit; proc print data=sasuser.admitfee; var id name actlevel fee;
run;
data sasuser.admitfee;
set sasuser.admit;
run;
proc print data=sasuser.admitfee
var id name actlevel fee;
run;
9237 data sasuser.admitfee; 9238 set sasuser.admit; 9239 run; NOTE: There were 21 observations read from the data set SASUSER.ADMIT. NOTE: The data set SASUSER.ADMITFEE has 21 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 9240 proc print data=sasuser.admitfee 9241 var id name actlevel fee; --- 22 76 ERROR 22-322: Syntax error, expecting one of the following: ;, (, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL, GRANDTOT_LABEL, GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT, STYLE, SUMLABEL, UNIFORM, WIDTH. ERROR 76-322: Syntax error, statement will be ignored. 9242 run
data sasuser.admitfee;
set sasuser.admitfee;
where actlevel='HIGH;
run;
proc print data=sasuser.admitfee;
var id name actlevel fee;
run;
*'; run;
data sasuser.admitfee;
set sasuser.admit;
where weight>180 and (actlevel="MOD" or actlevel="LOW");
run;
proc print data=sasuser.admitfee keylabel;
label actlevel='Activity Level';
run;
9250 data sasuser.admitfee; 9251 set sasuser.admit; 9252 where weight>180 and (actlevel="MOD" or actlevel="LOW"); 9253 run; NOTE: There were 2 observations read from the data set SASUSER.ADMIT. WHERE (weight>180) and actlevel in ('LOW', 'MOD'); NOTE: The data set SASUSER.ADMITFEE has 2 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 9254 proc print data=sasuser.admit keylabel; -------- 22 202 ERROR 22-322: Syntax error, expecting one of the following: ;, (, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL, GRANDTOT_LABEL, GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT, STYLE, SUMLABEL, UNIFORM, WIDTH. ERROR 202-322: The option or parameter is not recognized and will be ignored. 9255 label actlevel='Activity Level'; 9256 run; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.01 seconds