Stocks were relatively unchanged and closed mixed in listless trading Wednesday as the S&P 500 managed to eke out another record closing high.

The major indexes traded within a narrow range all day as the Standard & Poor's 500 hovered right around the 2000 mark that it finally closed over the day before.

In the last few minutes of trading, the S&P 500 index bumped up 0.10 point to a record close of 2000.12. The Dow Jones industrial average gained 15.31 points, or 0.1%, to 17,122.01. Both indexes have risen seven of the past eight trading sessions.

The Nasdaq composite index was down slightly, falling 1.02 point to 4569.62.

Wall Street's recent record-setting rally has been sparked by growing signs that the U.S. economy and labor market are improving and better-than-expected second-quarter earnings.

In Europe, Britain's FTSE 100 was up 0.1% to 6830.66, while Germany's DAX fell 0.2% to 9569.71 and France's CAC-40 gained less than 0.1% to 4395.26.

Tuesday stocks rose as the S&P 500 rose 2.10 points, or 0.1%, to close at a record 2000.02. The Dow gained 29.83, or 0.2% to 17,106.70 after earlier hitting an intraday record high of 17,153.80. The Nasdaq composite index rose 13.29, or 0.3%, to 4570.64.