Hello, I have a problem I'm hoping you might help me with. I need to extract data from a table called CLK1_PREMIUM_(Period_yyyymm). As you can see, it has a parameter in the name. An example of a physical table name is CLK1_PREMIUM_201407. If I add the following line in the precode, I can extract the data just fine: call symput('period_yyyymm', '201407'); However, I don't want to hardcode 201407. It must be automated. So, instead I use the below code as precode. It finds the previous month using the intnx function, and puts it into the correct format. data _null_; prev_month_date = intnx('month', date(), -1, 'e'); prev_month_yyyymm = compress(catx('', year(prev_month_date), put(month(prev_month_date), z2.))); call symput('period_yyyymm', prev_month_yyyymm); run; Despite the fact that period_yyyymm=201407 when I use this precode, just as it was when i hardcoded it, the extract fails. It tells me "ERROR: The value 'Calc1.CLK1_PREMIUM_201407'n is not a valid SAS name." My problem is that SAS for some reason adds quotes and 'n' to the table name it tries to extract from (see red highlight above). I don't get why it does this when I use the second precode, but not when I use the first hardcoded precode. I'm running this in DI Studio 4.7. Do anyone here have insight into this problem? Thanks.
... View more