The Nasdaq and the S&P 500 turned negative on Friday while the Dow Jones industrial average trimmed gains, as investors became cautious about the prospects of sustaining a six-month rally.

* The Dow Jones industrial average <.DJI> gained 24.79 points, or 0.25 percent, to 9,808.71. The Standard & Poor's 500 Index <.SPX> added 0.63 points, or 0.06 percent, to 1,066.12. The Nasdaq Composite Index <.IXIC> dropped 4.15 points, or 0.20 percent, to 2,122.60.

(Reporting by Ellis Mnyandu; editing by Jeffrey Benkoe)