In the below code, I'm using macro variables in then statement, however any variation of code seems to be failing in one or the other.
%MACRO LOOP_I;
DATA JAV_WORK2;
set WORK.JAV_WORK1;
%do i = 1 %to 24 %by 1;
%IF FF in ('CV', 'CV1', 'CV2', 'CVA', 'CVP', 'HAS') and S_TYPE in ('ETR_CARD', 'ETR_PCP', 'ETR_TRX') %THEN MONTH&i_SALES=trx&i;
%ELSE %IF FF = 'HAS' and LENGTH(GEO_ID) = 6 and S_TYPE = ('ETR_DDD') %THEN MONTH&i_SALES= UNIT&i;
%end;
RUN;
%MEND LOOP_I;
%LOOP_I
When I tried removing % from IF statements, then I was receiving "ERROR 180-322: Statement is not valid or it is used out of proper order". TIA