It depends on what you mean by "record" -- if by "record" you mean the observation in a dataset and deleting it with a DATA step program...then, yes... you could delete observations from a dataset where the value for the physician variable was missing or blank.
On the other hand, if by "record" you mean suppressing a report row that is being generated with PROC REPORT. You cannot suppress or delete a report row as PROC REPORT is generating the REPORT.
For example, if you have this data:
[pre]
Terrid Phys total flag
111 A 500 Y
111 B 600 N
111 C 500 N
112 D 100 N
112 E 100 Y
112 C 400 N
112 F 200 N
[/pre]
Then you have to decide whether you want a DETAIL report -- where you have one report row for every observation in the original data set or whether you want a SUMMARY report, where you have one report row which represents the summary for a "group" of observations (such as those observations grouped by TERRID).
If you want a DETAIL report -- then by default -- PROC REPORT would DISPLAY every observation -- unless you use a WHERE statement or pre-process the data (such as to get rid of the obs where FLAG = Y). Your choices for a DETAIL report are to DISPLAY every value for every obs -- where PROC REPORT respects the original ordering of the data. OR to use a variable, such as TERRID as an ORDER variable, in which case, the repetitious display of TERRID would be suppressed on some report rows.
It is easy with PROC REPORT, especially when you are generating a DETAIL report, to forget that PROC REPORT is building a report row for EVERY observation and then, adding summary lines, as instructed by your BREAK and RBREAK statements. If, on the other hand, you wanted a SUMMARY REPORT from the above data, then you would define TERRID as a GROUP item on the REPORT. Without the PHYS column on the report, the above data would collapse down to 2 report rows -- one row for TERRID 111 and a second row for TERRID 112. If you add a final summary line or overall report break to the report, then you'd have 3 report rows on your SUMMARY or GROUP report.
So the answer to your question really depends on whether you are trying to delete a REPORT row or whether you are trying to delete an observation -before- PROC REPORT handles the data.
cynthia
[pre]
data scrip;
length Phys $15;
infile datalines;
input terrid Phys $ total flag $;
return;
datalines;
111 A 500 Y
111 B 600 N
111 C 500 N
112 D 100 N
112 E 100 Y
112 C 400 N
112 F 200 N
;
run;
ods listing close;
options nodate nonumber center;
ods html file='terrid.html' style=sasweb;
proc report data=scrip nowd;
title 'TERRID and Phys as ORDER variables';
column terrid phys total;
define terrid / order;
define phys / order;
define total / sum;
break after terrid / summarize;
rbreak after/ summarize;
compute after terrid;
phys = 'Total';
line ' ';
endcomp;
compute after;
phys = 'Total';
endcomp;
run;
proc report data=scrip nowd;
title 'TERRID as group variable';
column terrid t_id n total;
define terrid / group noprint;
define t_id / computed 'Terrid';
define n / 'Phys Count';
define total / sum;
rbreak after / summarize;
compute t_id / character length=8;
t_id = put(terrid,3.0);
endcomp;
compute after;
t_id = 'Total';
endcomp;
run;
ods html close;
[/pre]