2
votes

Using PROC SQL, I changes column names from English to Hebrew. When I use such tables via PROC REPORT, SAS uses the English columns names, even though the BY and DEFINE statements use the new Hebrew named column

PROC  REPORT DATA= work.sharon ;
BY 'סניף'n ;
DEFINE 'סניף'n / group;
RUN;
2

2 Answers

1
votes

I am guessing that the original data had labels. SAS will keep the old labels after you rename a variable. You can see the problem here:

data blah;
    i = 23;
    label i = "eye";
run;

data blah2;
    set blah (rename = (i = a));
run;

proc report data = blah2;
run;

You can manually set the label for each variable with a label or attrib statement or, if you prefer to always use the variable names, just strip off all the labels for the dataset like this:

data blah3;
    set blah2;
    * remove all labels;
    attrib _all_ label = " ";
run;

proc report data = blah3;
run; 
1
votes

If a variable has a LABEL PROC REPORT will use it as the column header. You can change the label or override in the define statement or use the SAS system option NOLABEL; Try one of these

label 'סניף'n = 'סניף';

DEFINE 'סניף'n / group 'סניף';

options label=0;