U.S. stocks ended nearly flat Thursday as a rally in health-care shares after earnings from companies such as Schering-Plough Corp. offset worries China may take steps that reduce demand for U.S. goods.

The Dow eked out a record closing high for a second day in a row.

The Dow Jones industrial average rose 4.79 points, or 0.04 percent, to close at 12,808.63, a record. But the Standard & Poor's 500 Index was down 1.77 points, or 0.12 percent, at 1,470.73. And the Nasdaq Composite Index was down 5.15 points, or 0.21 percent, at 2,505.35.

Click here to visit FOXBusiness.com's Investing Center.

Schering-Plough posted a 55 percent rise in first-quarter profit, well above expectations, and its stock helped support the S&P 500 index. An index of pharmaceutical shares gained 0.9 percent, rising to its highest level in five years.

Concerns about China's torrid rate of growth comes nearly two months after a sharp drop in its main stock index triggered a global equity sell-off that led to the biggest tumble in U.S. stocks since 2001.

"We had a market that's been overbought and in need of a pullback, and you had that catalyst in the way of China overnight," said Steve Goldman, market strategist at Weeden & Co., in Greenwich, Connecticut.

In earnings, he said "the bar has been lowered over the past month or so with expectations, and that makes it a little bit easier to jump over that hoop."

Despite the Dow's slight gain to another record, the market's breadth was decidedly negative. Decliners outnumbered advancers by a ratio of about 2 to 1 on both the New York Stock Exchange and the Nasdaq.

Shares of companies with a major interest in the Chinese economy, including heavy-equipment maker Caterpillar Inc. (CAT), led declines. Caterpillar was down 0.7 percent at $68.62. Shares of Boeing Co. slipped 1 percent to $92.99.

China said the country needed to take timely measures after data showed its economy had grown 11.1 percent in the first quarter. Analysts said the surge in China's gross domestic product could trigger increases in interest rates to cool that country's economic boom, which would hurt global demand.

In the drug sector, shares of Schering-Plough jumped 8.6 percent to $31 on the NYSE.

Biotechnology company Amgen lent support to the market, rising 3.9 percent to $62.32 and ranking as the second-biggest gainer in the Nasdaq 100 . Amgen said a study involving its most important drug showed no increased risk of death.

Shares of Altria Group Inc (MO), parent of cigarette maker Philip Morris, fell 1 percent to $69.40 after a disappointing profit .

Shares of online auction leader eBay Inc. (EBAY) were down 3.7 percent at $33.19 and were the biggest drag on the Nasdaq, despite reporting quarterly results late Wedneday that topped Wall Street's expectations.

In economic news, the New York-based Conference Board, a private research group, said its index of leading economic indicators rose in March as expected, suggesting slow U.S. growth is likely to continue in the near term.

Before the opening, a report showed higher-than-expected weekly claims for unemployment benefits, suggesting weakness in the labor market. .

Volume was moderate on the NYSE, where about 1.64 billion shares changed hands, below last year's estimated average daily volume of 1.84 billion. On the Nasdaq, about 2.13 billion shares traded, above last year's daily average of 2.02 billion.

Click here to visit FOXBusiness.com's Investing Center.