The Dow industrials and S&P 500 edged higher in choppy trade on Friday after a brokerage's upgrade of Merck boosted the healthcare sector, while financials cut earlier losses.

A drag from big-cap technology companies kept the Nasdaq near the break-even point.

The Dow Jones industrial average <.DJI> gained 17.20 points, or 0.24 percent, to 7,187.26. The Standard & Poor's 500 Index <.SPX> added 1.07 points, or 0.14 percent, to 751.81. The Nasdaq Composite Index <.IXIC> dropped 3.63 points, or 0.25 percent, to 1,422.47.

(Reporting by Deepa Seetharaman; Editing by James Dalgleish)