Hi, I want the the current month date to refer to the prior months start date until 4th of the current month which I am able to do using the below code. data A; format CM date9.; if day(today())>=5 then CM=intnx('month',today(),0,'b'); else CM=intnx('month',today(),-1,'b'); run; Once I get CM I want to be able to use it in another program where I will use it in the where clause proc sql; create table WANT as select * from A(a table in my library) where month_dt= CM; quit; If i write it this way, I get the errror that CM does not exist in A Can this be done? OR can CM be converted to a macro so that it can be used in WANT ? Thanks a lot in advance!!
... View more