US markets: S&P 500 opens at record high, Dow gains