New York - US stocks ended one of their flattest sessions in years on Wednesday as a positive read on private sector employment wasn't enough to interest buyers ahead of the highly anticipated June payrolls report.

Trade was quiet, with volume low and the S&P's intra-day range a mere 0.2 percent, the narrowest since 1993, according to research firm MKM Partners. Nonetheless, the minuscule gains on the Dow and S&P 500 allowed the indexes to end at record highs.

The Dow ended 0.2 percent below 17,000, moving within 15 points of that milestone at its session high, while the S&P 500 was less than 1.5 percent under its own landmark of 2,000. Both levels could serve as psychological barriers as the market trades at record highs.

US private employers hired 281 000 workers in June, far exceeding expectations for 200 000, data from payrolls processor ADP showed. The number bodes well for the government payroll data due before the market opens on Thursday. A gain of about 212 000 jobs is expected in that report, down from May's 217 000.

“The odds are pretty good that we'll break through 17 000 soon, but people are hesitant to put on big bets ahead of the payroll report, especially with market liquidity so thin,” said Jim McDonald, who oversees $915 billion as chief investment strategist at Chicago-based Northern Trust Global Investments. “It makes sense to see a little consolidation after yesterday's gains.”

The Dow Jones industrial average rose 20.17 points or 0.12 percent, to 16,976.24, the S&P 500 gained 1.3 points or 0.07 percent, to 1,974.62 and the Nasdaq Composite dropped 0.92 points or 0.02 percent, to 4,457.73.

The S&P utilities sector suffered its biggest one-day decline since May and was by far the worst performer among the ten industry sectors. The group fell 2 percent as traders bet the labour data indicated a stronger economy and the potential for higher interest rates. Utilities, because of their typically steep dividend yields, are a market favourite in a low interest rate environment.

Constellation Brands was one of the S&P 500's biggest percentage gainers, up 2.3 percent to $90.45 after reporting earnings beat expectations.

JPMorgan Chase fell 1 percent to $56.97 after Chief Executive Officer Jamie Dimon said he had been diagnosed with early stage throat cancer but would remain actively involved in the largest US bank's business while in treatment.

In deal news, TechCrunch reported Rackspace Hosting may take itself private, while Bloomberg reported Shutterfly was working with boutique investment bank Qatalyst Partners to find buyers. Rackspace shares rose 6.3 percent to $35.88 while Shutterfly jumped 15 percent to $50.

About 61 percent of stocks traded on the New York Stock Exchange closed lower while 53 percent of Nasdaq-listed stocks ended in negative territory. About 4.79 billion shares traded on all US platforms, according to BATS exchange data, well below the month-to-date average of 6.15 billion. - Reuters