What is the underlying data source?
6 million records, in a SAS Dataset or in a database?
If a database, which database: Oracle, SQL Server, DB2, etc. ?
Are you using pass-through or a libname to access the database?
Why are you wanting to split your work up into 65,000 record (obs) chunks?
Why 65,000?
Why are you using proc sql instead of a Data step?
SAS has many tools, and depending on what is desired, it probably has the right tool for the job. I remember when I first learned about proc sql. I was ecstatic because I needed to do a real join and had been beating my head against the wall with merges, by-sets and loops. There are times when a data step is more appropriate, and times when proc sql is more appropriate. Similarly, there are times when Base SAS is best, when SPDE is best, when Oracle is best, and when DB2 is best. It all depends on what is trying to be accomplished.