S&P 500, Nasdaq finish greater in uneven session as inflation information looms