Yes, you are right, ballardw. Actually I realized this point, but I don't know how to correct it, I mean how to use a macro to solve this problem. Now I got ideas from this post, thanks.
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.