Maria Torres
asked on
SAS: Unable to resolve "Invalid symbolic variable name ,." error...
First let me start by stating that I'm not a SAS programmer but was assigned to write a small program in SAS. (The existing SAS programmer resigned.)
I'm trying to call from a DATA statement a macro that will be called recursively. But when I run the code I receive the following message "Invalid symbolic variable name ,." I believe this error message pertains to the macro code that I wrote. Below is snippet of my code.
Can someone assist me with this issue? Thank you.
I'm trying to call from a DATA statement a macro that will be called recursively. But when I run the code I receive the following message "Invalid symbolic variable name ,." I believe this error message pertains to the macro code that I wrote. Below is snippet of my code.
Can someone assist me with this issue? Thank you.
%macro ICD9Map(icd10code);
%global cnt_ICD9, icd9_list;
proc sql;
select numICD9s
into :cnt_ICD9
from sbhs.pxlookup
where icd10 = "&icd10code";
%let cnt = &cnt_ICD9;
%do i = 1 %to &cnt;
select icd9_&i
into :icd9_list
separated by "~"
from sbhs.pxlookup
where icd10 = "&icd10code";
%end;
quit;
%mend ICD9Map;
data icd9Mapping;
set sbhs.Pxreorder (obs=1);
array Px{*} PROC1-PROC13;
*do i = 1 to npx;
do i = 1 to 1;
call execute('%ICD9Map('||Px(i)||')');
end;
drop i;
run;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER