Can anybody be kind of help solving the problem in my Macro?
The data is from a large scale survey. The purpose of this macro is to generate and output a distribution.frequency results of a specified variable as a file, within the file the variable lable is used instead of variable, and the recoded value of the variable is used ithrough Variable format instead of the original variable value. Variable has already been formated/recoded.
Since the variable label is too long, so I want to assign a macro variable to it first.
The SAS codes are as the following:
%let Q1_label='abcdefgh';
%macro f_freq(var, var_w, var_label);
proc freq data= clean_data order=freq;
table &var /out=freqout.freq_&var;
format &var &var_w;
label &var=&var_label;
run;
%mend;
%f_freq(Q1,Q1_w., Q1_label);
Great thanks in advance.