Making quintiles will be the easy part.
But before we get to that:
You are apparently forming 25 new portfolios each year. Are you bringing forward holdings of the equivalent portfolio from the end of the previous year? (Is that what you mean by value weighted?). What is the timing of annual rebalancing? By that I mean are you using price at the beginning of the fiscal year and book value from the end of the prior fiscal year, (i.e. 1 day earlier)? Even though that book value won't be published until the next quarterly or annual filing 6 weeks or more later?
And don't forget, with Compustat data (whicih uses GVKEY as the company identifier), you'll have to account for stock splits.
You can start to answer these questions by providing a working data step with sample data.