Please can someone help tell me why the data Ycomple1 is not being created despite the data Ycomple exist.
%macro multi;
Run the following and post the log then we can tell you why.
EDIT: I don't see the macro actually called so adding that in, just in case.
options mprint symbolgen;
%macro multi;
data Ycomple1;
set Ycomple;
%do i=0 %to 4;
ipw&i=ipw*WGT&i;
drop WGT&i;
%end;
run;
%mend multi;
%multi;
@desireatem wrote:
Please can someone help tell me why the data Ycomple1 is not being created despite the data Ycomple exist.
%macro multi;
data Ycomple1; /*** This data is not created *****/;set Ycomple; / ** This data exist ****/;%do i=0 %to 100;ipw&i=ipw*WGT&i;drop WGT&i;%end;run;%mend multi;
put another semicolon after %end
%end; ;
That does not solve it.
please show the error log
Run the following and post the log then we can tell you why.
EDIT: I don't see the macro actually called so adding that in, just in case.
options mprint symbolgen;
%macro multi;
data Ycomple1;
set Ycomple;
%do i=0 %to 4;
ipw&i=ipw*WGT&i;
drop WGT&i;
%end;
run;
%mend multi;
%multi;
@desireatem wrote:
Please can someone help tell me why the data Ycomple1 is not being created despite the data Ycomple exist.
%macro multi;
data Ycomple1; /*** This data is not created *****/;set Ycomple; / ** This data exist ****/;%do i=0 %to 100;ipw&i=ipw*WGT&i;drop WGT&i;%end;run;%mend multi;
Thank you, you are right, it wasnt being called.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.