That is very odd. I have never had PROC REPORT display the word ERROR on a report when the data value is missing. Although you can sometimes get ERROR messages in the log when you try to use a variable the wrong way or apply the wrong format.
Try this program in a code node (NOT as a stored process). In my program, I am creating a file of 5 observations. Then I run a series of PROC SQL steps showing how to select rows based on whether NAME is missing, GRP is missing or NUMVAR is missing or whether they're NOT missing. Then I run a PROC REPORT on the same data.
[pre]
data makedata;
infile datalines dsd;
input name $ grp $ numvar;
return;
datalines;
allan, aaa, 10
bob,,20
carl,ccc,30
dave,ddd,.
,eee,50
;
run;
title 'name is missing';
proc sql;
select name, grp, numvar
from makedata
where name is missing;
quit;
title 'grp is missing';
proc sql;
select name, grp, numvar
from makedata
where grp is missing;
quit;
title 'numvar is missing';
proc sql;
select name, grp, numvar
from makedata
where numvar is missing;
quit;
title 'all have values';
proc sql;
select name, grp, numvar
from makedata
where name is not missing and
grp is not missing and
numvar is not missing;
quit;
title 'Simple Proc Report';
proc report data=makedata nowd;
column name grp numvar;
run;
proc format;
value $namefmt ' ' = 'Not Applicable';
value $grpfmt ' ' = 'Not Applicable';
value nvfmt . = 'Not Applicable';
run;
title 'Format with Proc Report';
proc report data=makedata nowd ;
column name grp numvar;
define name / display f=$namefmt.;
define grp / display f=$grpfmt.;
define numvar / sum f=nvfmt.;
run;
title;
[/pre]
The first PROC REPORT does not use any format for the missing values, but the second PROC REPORT does use a format to put "Not Applicable" in the columns with missing values.
If you are having trouble with a specific type of data or with PROC REPORT or your PROC SQL, your best bet might be to contact Tech Support because they can look at your data and at your code and help you resolve the problem.
cynthia
Results from the Proc Reports:
[pre]
Simple Proc Report
name grp numvar
allan aaa 10
bob 20
carl ccc 30
dave ddd .
eee 50
Format with Proc Report
name grp numvar
allan aaa 10
bob Not Applicable 20
carl ccc 30
dave ddd Not Applicable
Not Applicable eee 50
[/pre]