I don't understand why you say "ColA, ColB, ColC are blank." Do you mean missing values? A numeric variable cannot be "blank."
Here are two examples that demonstrate how the DATA step works for numeric variables (hopefully this is your situation) and character variables (probably a mistake that should be fixed). In both cases, the total is 0 when the variables are all missing.
/* the usual case: the variables are numeric */
data Have;
input colA colB colC;
sum = Sum(0, colA, colB, colC); /* variables are numeric */
datalines;
1 2 3
. 2 3
1 . 3
1 2 .
. . .
;
proc print data=Have; run;
/* How does the SUM function behave if given character
variables that can be converted to numbers? */
data Have2;
length colA colB colC $1;
infile DATALINES delimiter=',' DSD;
input colA colB colC $; /* make variables character */
sum = Sum(0, colA, colB, colC);
datalines;
'1', '2', '3'
' ', '2', '3'
'1', ' ', '3'
'1', '2', ' '
' ', ' ', ' '
;
proc print data=Have2; run;
... View more