NEW YORK -- CVS Caremark Corp. and Walgreen Co. have settled a dispute that threatened to change where millions of Americans can fill prescriptions. The companies, which said Friday they had agreed on a multiyear deal but did not disclose its terms, were battling over the amounts Caremark reimburses Walgreen for filling prescriptions for Caremark patients.