I am trying to get a report of all the obs for the week ending a week before today. For eg. if today is 5/19/10. I would like to get all the observations for the week of 5/5/10 - 5/12/10. I am running a DI job to do this, but I am not sure on how to specify the date ranges. Can anyone offer any suggestions.
You use SAS Extract transform in DI Studio, or potentiality SQL Join if more than one table is involved.
If your data is huge, or reside in an external RDBMS, consider to calculate the start and end dates of the BETWEEN interval in a pre-process. Store them as macro variables, for use in the Extract.
The use of functions and calculation can prevent SAS from using indexes, or to send the code to the RDBMS for execution.