* U.S. stocks end flat, though Amazon.com, Whole Foods deal weighs
* Dollar index lower after U.S. economic data
* Bond yields also down after data; oil edges higher (Updates with closing U.S. market levels)
NEW YORK, June 16 (Reuters) - U.S. stocks ended little changed on Friday, though Amazon.com's deal to buy upscale grocer Whole Foods Market pressured a wide range of companies including Wal-Mart, while the dollar and U.S. Treasury yields dipped after disappointing economic data.
Energy shares offset the declines in consumer names, with the S&P energy index rising 1.7 percent and oil prices ending higher on the day.
The Amazon deal sent shockwaves through the food distribution market and others, hurting stocks like Wal-Mart Stores, which slid 4.7 percent, grocer Kroger, which tumbled 9.2 percent, and Costco Wholesale, which fell 7.2 percent.
The S&P 500 consumer staples index ended down 1 percent.
"It's disrupting a number of industries here, and that's what's causing the market problems," said Bruce Bittles, chief investment strategist at Robert W. Baird & Co in Sarasota, Florida.
Shares of online retailer Amazon rose 2.4 percent and Whole Foods shot up 29.1 percent.
The Dow Jones Industrial Average was up 24.38 points, or 0.11 percent, to end at 21,384.28, the S&P 500 added 0.69 point, or 0.03 percent, to 2,433.15 and the Nasdaq Composite dropped 13.74 points, or 0.22 percent, to 6,151.76.
MSCI's index of stock markets across the world rose 0.3 percent, while European shares added 0.6 percent, rebounding from recent losses.
In the foreign exchange market, the U.S. dollar fell against a basket of key currencies after the day's data, which raised concerns about spending. It was last down 0.3 percent after the day's data.
U.S. homebuilding fell for a third month in May to the lowest in eight months as construction activity declined broadly, while the University of Michigan said its barometer of U.S. consumer sentiment unexpectedly fell in early June.
The Japanese yen rose against the dollar, reversing course after sliding to a two-week low, when the Bank of Japan left its mass money printing program unchanged, maintaining the contrast with the Federal Reserve, which signaled further tightening this week.
The weaker-than-expected U.S. data also weighed on U.S. Treasury yields as it fueled uncertainty about the U.S. rate outlook.
Benchmark 10-year Treasuries were last up 2/32 in price to yield 2.155 percent, compared with 2.162 percent late Thursday.
"There are some very serious concerns about the Fed tightening right now and about the Fed reducing their balance sheet right now. We're potentially prompting a recession here," said Stephen Massocca, senior vice president at Wedbush Securities in San Francisco.
Oil prices staged a modest rebound as some producers reduced exports and U.S. rig additions slowed.
Brent crude futures rose 45 cents to settle at $47.37 per barrel, while U.S. crude settled at $44.74, up 28 cents. Both benchmarks notched a weekly loss exceeding 1.6 percent.
For Reuters Live Markets blog on European and UK stock markets see reuters://realtime/verb=Open/url=http://emea1.apps.cp.extranet.thomsonreuters.bi z / c m s / ? p a g e I d = l i v e m a r k e t
(Additional reporting by Sam Forgione and Richard Leong in New York, Marc Jones in London and Nichola Saminather in Singapore; Editing by Bernadette Baum and James Dalgleish)