started playing around with SAS University and need help on best way to perform a task. have not used SAS for over 30 years so i'm a little rusty. i have two files which i can import into a SAS data set. one is the electric bill information that contains an end date (i.e. meter read), number of days in billing cycle, kilowatt hours used, etc. the other file contains weather information (daily) such as temperature. i want to add the average temperature for each billing cycle month into the electric bill data set. if the electric bill information was by month (1st of month to end of month) it would be trivial. however, the electric bill goes from, say the 16th of the previous month to the 15th of the current month (i.e. the end date) for each billing cycle. what i want to do is capture the monthly data from the weather data set from the 16th of the previous month to the 15th of the billing month. what's the best way to process this? if i have a set statement for the electric bill can i go into a loop from the 16th of the month to the 15th of the next month and in this loop have another set statement to read the weather data set for those dates that encompass the billing cycle? can you process two data sets that contain different types of data in a data step? is the way i describe the best solution or is there an easier way? thanks.
... View more