U.S. stocks gave up early gains to end flat on Thursday as consumer discretionary shares fell and investors showed caution ahead of the April jobs report. The Dow Jones industrial average closed up 9.45 points, or 0.05 percent, to 17,660.71, while the S&P 500 lost 0.49 point, or 0.02 percent, to 2,050.63, its third straight session of losses. The Nasdaq Composite index dropped 8.55 points, or 0.18 percent, to 4,717.09.