11-27-2017 04:47 PM
I think I have forgotten something basic. I am trying to loop through my macro code to create ten datasets. Below is my code. When I run it as is it runs fine but when I uncomment to run the macro code block then I get the missing quote error.
I am not sure how quotes work but I think SAS is adding a double quote somewhere and causing this macro to not work.
Any help appreciated. I have been manually running this 10 times )-:
libname data "H:\sasdata\eligibility";
options symbolgen mlogic serror merror mprint;
*%do ct=2 %to 4;
%let ct = 5;
%let st = &ct.000000000;
%let et = &ct.999999999;
CREATE TABLE DATA.T0265_AG_IN_ELIG_P&ct AS
WHERE PIN_NUM > 0
AND PIN_NUM between &st and &et
AND CURRENT_ELIG_IND IN ('1','9')
AND PROGRAM_CD = 'CC'
AND SUBPROGRAM_CD NOT IN ('X','Z')
AND AG_SEQ_NUM > 0
AND CAG_ELIG_SEQ_NUM > 0
AND AG_STS_CD = 'O'
AND PAYMENT_BEGIN_DT <= '27nov2017'd
AND PAYMENT_END_DT >= '27nov2017'd
AND PAYMENT_BEGIN_DT <= PAYMENT_END_DT
AND PART_STS_CD = 'EA';
Need further help from the community? Please ask a new question.