Energy companies have led US stocks slightly higher, nudging the Nasdaq to its fifth record-high close in a row.
Rising crude oil prices gave energy firms a boost including oil rig operator Transocean, which rose 4%.
Healthcare stocks fell after President-elect Donald Trump spoke about the need for the government to stem drug costs by creating new bidding procedures.
Pharmaceutical company Endo International led the fallers in the Standard & Poor's 500 index, sliding 8.5%.
The stock market spent much of the day wavering between small gains and losses as investors sized up outlooks from several companies ahead of the latest batch of corporate earnings reports.
"The heavy load comes in the coming weeks," said Tim Dreiling, regional investment director for US Bank's Private Client Reserve. "There's a little bit of a wait-and-see on what those earnings numbers look like."
The Dow Jones industrial average rose 98.75 points, or 0.5%, to 19,954.28.
The S&P 500 index added 6.42 points, or 0.3%, to 2,275.32.
The Nasdaq gained 11.83 points, or 0.2%, to 5,563.65. The index has risen every day this year.
During a press conference, Mr Trump said the government has to create new bidding procedures for the pharmaceutical industry "because they're getting away with murder".
The remarks sent healthcare stocks broadly lower, particularly pharmaceutical companies.
At one point, drugmakers and one prescription drug distributor accounted for the nine biggest losers in the S&P 500.
Big US companies start reporting fourth-quarter earnings this week.
On Friday JPMorgan Chase, Wells Fargo and Bank of America release their results.
"As we look into 2017, we still expect equities are going to be able to grind higher, because we still have enough of an economic push to do that," Mr Dreiling said.
"But a move up in equities is going to have to come from earnings, otherwise, these valuations ... look pretty stretched, pretty rich at these levels."