* Oil pares gains after US gasoline inventory data
* Railroad operators CSX, Norfolk, Union Pacific gain
* AbbVie drops on downgrade, biggest drag on S&P
* Indexes up: Dow 0.14 pct, S&P 0.05 pct, Nasdaq 0.01 pct (Adds details, comments, updates prices)
By Yashaswini Swamynathan
June 8 (Reuters) - Wall Street was little changed in a narrow trading range late on Wednesday morning, with the S&P 500 inching towards its all-time high, as oil prices gave up some early gains.
While oil prices held above $50 per barrel for the second consecutive day, they pared gains sharply after data showed a surprise build in U.S. gasoline inventories.
The energy index, which led the market higher at the start, reversed course to trade down 0.11 percent.
Investors have all but priced out an interest rate hike when Federal Reserve officials meet on June 14-15, after surprisingly weak monthly jobs data last Friday.
But Fed Chair Janet Yellen boosted sentiment by painting a mostly upbeat picture of the economy.
Waning prospects of a near-term rate hike pushed the dollar lower for the fourth day in a row, which in turn boosted commodities. Gold rose to a near three-week high.
”I think the good news for the market is that the sentiment is still far from euphoric. So if you have data just chug along and no major shocks, you could potentially have the market gap higher,“ ”said Marc Pouey, U.S. Equity and Quantitative Strategist at Bank of America in New York.
At 11:26 a.m. EDT the Dow Jones industrial average was up 24.24 points, or 0.14 percent, at 17,962.52.
The S&P 500 was up 1.12 points, or 0.05 percent, at 2,113.25, after rising within 14 points of its record high it touched in May 2015.
The Nasdaq Composite was down 0.74 points, or 0.01 percent, at 4,961.02.
Six of the 10 major S&P sectors were higher, led by the industrials index’s 0.5 percent rise.
Railroad operators CSX, Norfolk Southern and Union Pacific were all up about 2.4 percent.
Higher gold prices boost miners. Freeport rose 3.5 percent and Newmont gained 3.8 percent.
AbbVie fell 1.4 percent to $62.17, and was the biggest drag on the S&P, after Morgan Stanley downgraded the stock.
Advancing issues outnumbered decliners on the NYSE by 1,714 to 1,177. On the Nasdaq, 1,413 issues rose and 1,234 fell.
The S&P 500 index showed 33 new 52-week highs and no new lows, while the Nasdaq recorded 56 new highs and 18 new lows. (Reporting by Yashaswini Swamynathan in Bengaluru; Editing by Savio D‘Souza)