Thanks for the guidance,
It was the '1' and "1" I swear, quotes are going to kill me one day....
The folloing code now works...
%MACRO BLDTERM(TBL_BUILD,COHORT_YEAR,PRELIM,TERM_ID);
data _null_;
if "&TBL_BUILD" = "SUMMER_TBL_2" then do;
CALL SYMPUT('TERMV','1');
end;
run;
data _null_;
if "&prelim" = "P" then do;
CALL SYMPUT('DSNAME','PRELIM_SDCF_DATA_DIM');
end;
else do;
CALL SYMPUT('DSNAME','SDCF_DATA_DIM');
end;
run;
proc sql;
create table work.&TBL_BUILD as
select &COHORT_YEAR format=$9. AS COHORT_YEAR,
CASE WHEN "&TERMV" = "1" THEN 1 ELSE 0 END format=8. AS SUMMER_ALL,
CASE WHEN "&TERMV" = "1" AND &DSNAME..CF_FPTIME_IND = 'F' THEN 1 ELSE 0 END format=8. AS SUMMER_FULL_TIME,
CASE WHEN "&TERMV" = "1" AND &DSNAME..CF_FPTIME_IND = 'P' THEN 1 ELSE 0 END format=8. AS SUMMER_PART_TIME
from DIM.&DSNAME;
quit;
%MEND BLDTERM;
%BLDTERM(SUMMER_TBL_2,"&COHORT_YEAR",F,"&SUMMER_TERM_ID");
... View more