S&P 500 inches closer to record high; Nasdaq down