data work.profit; set ia.dnunder; set ia.sale2000(keep = RouteID FlightID Date Rev1st RevBusiness RevEcon RevCargo) key = FlightDate; Profit = sum(Rev1st, RevBusiness, RevEcon, RevCargo, - Expenses); run; proc print data = work.profit; title 'Profit for the Flights to Australia and New Zealand'; run;