data a ; 
set n;           
 if col1^=. and col2= .  and col3= .  and col4= . and  col5= .  and  col6= .  then group=col1;else                                                 
 if col1^=. and col2^=. and  col3= .  and col4= . and  col5= .  and  col6= .  then group=col1||' 和 '||col2;else                                      
 if col1^=. and col2^=. and  col3^=. and  col4= . and  col5= .  and  col6= .  then group=col1||' 和 '||col2||'和'||col3;else                           
 if col1^=. and col2^=. and  col3^=. and  col4^=. and  col5= .  and  col6= .  then group=col1||' 和 '||col2||'和'||col3||'和'||col4;else                    
 if col1^=. and col2^=. and  col3^=. and  col4^=. and  col5^=.  and  col6= .  then group=col1||' 和 '||col2||'和'||col3||'和'||col4||'和'||col5;else        
 if col1^=. and col2^=. and  col3^=. and  col4^=. and  col5^=.  and  col6^=.  then group=col1||' 和 '||col2||'和'||col3||'和'||col4||'和'||col5||'和'||col6;
run; 
不知道哪里出错了,除了第一种情况正常显示了,其他五个情况都显示为 . 
col1 --col6都是数值型变量。
请大家帮忙。谢谢。