data codes to create variables */ data salesl ; set mysales ; date = datepart (Invoicedate); yearmm = year (date) *100+month (date); total sale UnitPrice* Quantity; month month (date); quarter = qtr (date); itemID=1*substr(StockCode, 1, 2); if itemID = . then delete ; 1_date= '31DEC2011'D; format date 1_date maddyy 10. ; if country = "United Kingdom" then UK = 1; else UK = 0; if totalsale = . then delete ; run ;
Fig: 1