Stock indexes turned positive on Friday and were trading mostly flat, buoyed by gains in energy and basic materials companies.

The Dow Jones industrial average <.DJI> dipped 2.92 points, or 0.02 percent, to 11,981.69. The Standard & Poor's 500 Index <.SPX> edged up 2.59 points, or 0.20 percent, to 1,297.70. The Nasdaq Composite Index <.IXIC> gained 4.64 points, or 0.17 percent, to 2,705.66.