I have the below macro, PARAMETERS, that assigns values to five variables and creates the table MD_WRK.SUB_ID. My issue is that the code within the macro worked fine until I placed it within the macro. Now the variables are not being populated and the PROC SQL for table creation is not being executed. When I remove "%MACRO" the PROC SQL colors change to indicate that it is correct, but when within the macro they are greyed out. I can't understand why the code within the macro is being invalidated.
%MACRO PARAMETERS;
%GLOBAL FDMVAR1 FDMVAR2 UPBOUND LOBOUND GROUPVAR;
%LET FDMVAR1 ='31Mar2017:0:0:0'dt; /* Start Date */
%LET FDMVAR2 = '30Apr2017:0:0:0'dt; /* End Date */
%LET UPBOUND = .01;
%LET LOBOUND = -.01;
%LET GROUPVAR = 1;
PROC SQL;
CREATE TABLE MD_WRK.SUB_ID
(SUBSYS_ID char(6));
INSERT INTO MD_WRK.SUB_ID
VALUES('CBS')
VALUES('CDS')
VALUES('DDA')
VALUES('IMCOR')
VALUES('ODL')
VALUES('OEC')
VALUES('OEC2')
VALUES('SAV')
VALUES('PWRCDS')
VALUES('SMARTY')
VALUES('MRKTLN')
;
QUIT;
%MEND PARAMETERS;