Hello, I am struggling to incorporate three different macro variables into a program that otherwise works just fine. I've tried searching for solutions online, but am struggling to find anything that fixes these problems. The macro variables are set up at the beginning of the program: %let month_number = 8; %let month = 202308; %let day = 20230831; Firstly, I am trying to create a table: data table2; set table1; if PROCESS_YYYYMM <= (INCURRED_DT_YR_2) * 100 + &month_number. then... ... I'm getting a syntax error when I try using the &month_number. variable. Secondly, the program has a step where it connects to a server and creates a table with the following WHERE statement: WHERE t1.PROCESS_YYYYMM between '201601' and '202308' and t2.INCURRED_DT_DAY between '20160101' and '20230831' The program works just fine like this, but I'd like to incorporate the &month. and &day. variables in lieu of the end dates shown here. How do I need to format this? I've tried a number of different possibilities with apostrophes, quotation marks, and even tried using a %syslput line for each variable before this table gets created, but nothing that I've tried seems to work. I keep getting ERROR: CLI execute error and the table doesn't get created. Any help greatly appreciated!
... View more