Stocks ended nearly flat in a low-volume session on Wednesday, but some investors were encouraged to see equities avoid a selloff amid lingering euro zone debt problems.

Based on the latest available data, the Dow Jones industrial average was up 20.97 points, or 0.17 percent, at 12,418.35. The Standard & Poor's 500 Index was up 0.24 points, or 0.02 percent, at 1,277.30. The Nasdaq Composite Index was down 0.36 points, or 0.01 percent, at 2,648.36.

(Reporting By Caroline Valetkevitch; Editing by James Dalgleish)