By Anora Mahmudova and Victor Reklaitis, MarketWatch

Shares of energy giants Exxon Mobil, Chevron slump after earnings misses

U.S. stocks switched between small gains and losses Friday, held in check by disappointing earnings from energy giants Exxon Mobil and Chevron.

Investors also were debating whether fresh data on weak wage growth could prompt the Federal Reserve to think twice about raising interest rates in September.

"While weak data suggest the Fed might be patient with rate hikes, the other side of this story is that the economy is not growing as fast as we would hope," said Quincy Krosby, market strategist at Prudential Financial.

The S&P 500 was flat at 2,108. The S&P 500 energy sector dropped nearly 2%, leading the losses on the main benchmark.

The Dow Jones Industrial Average was off by 27 points, or 0.2%, at 17,718. The Nasdaq Composite added 10 points, or 0.2%, to 5,138.

The main indexes looked on track to record modest weekly and monthly gains.

Another focus of investors is second-quarter earnings. Reports so far this season have on the whole beaten estimates, but revenue and earnings growth have nonetheless been weak.

What strategists are saying: "The last data I saw from FactSet showed that 75% of S&P 500 companies that have reported have topped estimates, better than the 63% historical average, but earnings for the first half of the year are still on pace to actually contract by 0.7%, which would be the first year-over-year decline in the first half of a year since 2009," wrote Andrew Adams, chief market technician at Raymond James.

"As a result, we have not seen the market pop typically expected whenever such a large percentage of companies is topping estimates, and with stocks peaking the past two days at the 2110 level, it appears that level is the first hurdle to overcome before the prior high can be threatened," Adams wrote.

Other markets: Chinese stocks closed lower and notched their biggest monthly drop in nearly six years (http://www.marketwatch.com/story/china-shares-headed-for-worst-month-in-over-two-years-2015-07-31), while European equities seesawed but were poised for weekly and monthly gains (http://www.marketwatch.com/story/european-stocks-nudge-higher-ahead-of-inflation-data-2015-07-31).

Oil prices fell on Friday, with the commodity set to post its worst monthly showing of the year (http://www.marketwatch.com/story/crude-poised-for-worst-monthly-performance-of-2015-2015-07-31) so far. Gold futures were also lower, and the dollar (http://www.marketwatch.com/story/dollar-dips-versus-yen-euro-ahead-of-us-data-2015-07-31)weakened (http://www.marketwatch.com/story/dollar-dips-versus-yen-euro-ahead-of-us-data-2015-07-31).

Economic reports: The wages and benefits that companies, governments and nonprofit institutions pay their employees rose a record-low 0.2% in the second quarter, according to the employment cost index released by the Labor Department on Friday. That was well below the 0.7% gain in the first quarter and came as a surprise to economists surveyed by MarketWatch, who had expected a 0.6% gain.

"Wage costs data are very important for the Federal Reserve, as they would really like to see inflation to start going higher. But deceleration in wage growth suggests otherwise. At this point, nobody is sure what to do about the rates, neither the Fed nor the market," Krosby said.

Separately, Chicago PMI rose in July to the highest level since January, suggesting a pickup in business during the summer.

Read:Sharp deceleration in employment costs gives Fed a reason to delay rate hike (http://www.marketwatch.com/story/sharp-deceleration-in-employment-costs-gives-fed-a-reason-to-delay-rate-hike-2015-07-31)

Movers & Shakers: Exxon Mobil Corp. (XOM) shares dropped 4.6% after the biggest U.S. oil company reported a 52% drop in profit for its second quarter (http://www.marketwatch.com/story/exxon-mobil-earnings-halved-by-lower-oil-price-2015-07-31), as higher profit from its refining and chemical operations couldn't offset plunging earnings in its exploration and production business amid lower crude prices.

Chevron Corp. (CVX) slumped 4.2% after the oil giant reported a sharp decline in second-quarter profit and sales (http://www.marketwatch.com/story/chevrons-profit-plunges-on-low-oil-price-2015-07-31), hurt by lower crude prices and one-time charges.

Coca-Cola Enterprises Inc. (CCE) jumped 12% following news it is in merger talks with other Coke bottlers (http://www.marketwatch.com/story/coca-cola-enterprises-in-advanced-talks-over-tie-up-with-other-coke-bottlers-2015-07-31).

Expedia Inc. (EXPE) was another big S&P advancer, surging 10% after its quarterly earnings topped forecasts (http://www.marketwatch.com/story/expedia-profit-tops-expectations-2015-07-30-174852319) late Thursday.

Royal Caribbean Cruises Ltd.(RCL) surged 8.3% after raising its earnings outlook for the year (http://www.marketwatch.com/story/royal-caribbean-boosts-outlook-as-profit-beats-2015-07-31).

Hanesbrands Inc. (HBI) fell 11% after quarterly revenue missed estimates (http://www.wsj.com/articles/hanesbrands-misses-estimates-on-revenue-1438294406).

Read more in the Movers & Shakers column (http://www.marketwatch.com/story/exxon-mobil-chevron-royal-caribbean-earnings-in-focus-2015-07-30)

Subscribe to WSJ: http://online.wsj.com?mod=djnwires