I have changed the last 2 arrays as advised and that is working now. But the MAX function is now say 'ERROR 71-185: The MAX function call does not have enough arguments.'
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.