US: S&P 500 closes near record, Dow and Nasdaq fall