Hi, we have a huge problem with our code. We want to make a macro to categorize a dataset which looks like variable with conditions variable group number var 1 <20 variable name 1 20<var1<40 variable name 2 40<var1 variable name 3 so we would have a dataset like that: var 1 <20 1 20<var1<40 2 40<var1 3 to assign the number, which is in grp column to each of conditions based on one variable. unfortunately, the execution of the code ends with error: WARNING: Apparent symbolic reference GRP_KAT not resolved. NOTE: There were 3 observations read from the data set WYJ.VIN_KAT. NOTE: The data set WYJ.VIN_KAT has 3 observations and 212 variables. NOTE: Compressing data set WYJ.VIN_KAT increased size by 50.00 percent. Compressed is 3 pages; un-compressed would require 2 pages. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time 0.01 seconds NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 697:187 697:196 ERROR: Symbolic variable name . must begin with a letter or underscore. NOTE: Invalid argument to function SYMPUT at line 697 column 180. war=not missing(ACT_CALL_ACP) and ACT_CALL_ACP <= 1 zmienna=ACT_CALL_ACP grp=1 id=233 grp_kat=. _ERROR_=1 _N_=1 NOTE: The SAS System stopped processing this step because of errors. NOTE: There were 1 observations read from the data set WYJ.PODZIALY_INT_NIEM_ID. WHERE id=233; WARNING: The data set WORK.TYMCZASOWE_OBIEGI may be incomplete. When this step was stopped there were 1 observations and 5 variables. NOTE: Compressing data set WORK.TYMCZASOWE_OBIEGI increased size by 100.00 percent. Compressed is 2 pages; un-compressed would require 1 pages. WARNING: Data set WORK.TYMCZASOWE_OBIEGI was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.01 seconds %macro dane_kat;
%do i=1 %to 243;
data tymczasowe_obiegi;
set wyj.podzialy_int_niem_id (where=(id=&i));
call symput("war_kat", war);
call symput("zmienna_kat", zmienna);
call symput(grp_kat, grp);
run;
data &zb._kat;
set &zb._kat;
if &war_kat then put &zmienna_kat = &grp_kat;
run;
%end;
%mend dane_kat;
%dane_kat; Can you help us with that?
... View more