The major U.S. stock indexes closed at record highs on Friday, with the S&P 500 ending above 3,000 for the first time. The market was driven higher by technology, consumer discretionary and industrial company stocks, which more than offset the drop in drugmakers.