Greetings all. I am trying to learn SAS programming, and I must say it has been very frustrating at times, but I'm starting to like it. I've got sound SQL skills, so I found myself relying on proc sql as much as possible. However, I feel that goes against the spirit of SAS, so I started trying to do things without SQL, and progress has been slow. I've got one example I cannot even begin to fathom how to do without SQL, if anyone would be interested in giving it a whack. My data are a company's billing cycle, and the number of bills that go out the door every day. There are 21 billing cycles, and every customer account is put on one of them. Every cycle has a schedule on which it will bill, and it is basically once per month, since bills don't go out on weekends. Let's say today is the day for bill cycle 5 to send bills out. I need to know how many bills went out the door on time, in addition to the number of bills that went out the door 1 to 4 days late. A bill is late if it does not go out the door when it is supposed to. So, if today is bill cycle 5, then all bills that should have gone out today, and did, are on time. If a customer is on cycle 4, which should have gone out yesterday, but it went out today, then that bill is 1 day late. I've attached a file that contains sample data, all the code, and a 'Final' result table that I make using proc sql. Basically I'm just wondering how to go about producing dataset 'Final' without using any sql. Any ideas would be greatly appreciated. Greg
... View more