U.S. stocks rose on Thursday as strong earnings reports lifted big names like Apple, but underwhelming economic data and caution ahead of the long weekend kept gains in check.

The S&P 500 bumped up once more close to 1,340, a level that has triggered selling plenty of times this month. Some see a failure to convincingly rise above 1,344, the recent high in the benchmark, as a bearish technical signal.

But continuing with a recent swing in sentiment, Apple Inc , up 2.7 percent at $351.51, posted results that smashed Wall Street's expectations. The maker of the iPad and iPhone joined Intel, United Technologies and other names that have increased the perception of a healthy corporate America.

Companies are proving the concern over expectations was unwarranted because corporate earnings are looking very strong, said Eric Kuby, chief investment officer of North Star Investment Management Corp in Chicago.

Factory activity in the U.S. Mid-Atlantic region slowed sharply in April and the number of claims for unemployment insurance fell less than expected last week, implying the economy was struggling to regain momentum.

Data is telling you we're experiencing a little bit of a bump, a little bit slower growth, said Anthony Chan, chief economist of J.P. Morgan Private Wealth Management in New York.

But he said there was hidden good news in the prices paid component of the Philadelphia Fed survey.

The slowdown is also going to put a damper on price inflation, he said.

The Dow Jones industrial average <.DJI> rose 26.30 points, or 0.21 percent, to 12,479.84. The Standard & Poor's 500 <.SPX> added 5.44 points, or 0.41 percent, to 1,335.80. The Nasdaq Composite <.IXIC> gained 13.10 points, or 0.47 percent, to 2,815.61.

The Dow climbed as high as 12,496.83, its highest intraday level since early June 2008.

Travelers Cos Inc gave the Dow its biggest lift after the large property insurer reported a 30 percent rise in quarterly profit as it recorded higher investment income. Shares rose 3 percent to $60.90.

Even Morgan Stanley , which reported a near 50 percent drop in profit, posted gains as the decline was smaller than feared, thanks to stronger-than-expected fixed-income trading results. Its shares gained 2.8 percent to $26.77.

But McDonald's Corp was off 1.7 percent at $77.09, after the world's largest hamburger chain warned of accelerating food price inflation.

General Electric Co lost 2.5 percent to $19.89 as results failed to impress investors even after the largest U.S. conglomerate reported an 80 percent surge in first-quarter profit and raised its quarterly dividend.

Biogen Idec was the S&P 500's top gainer, up 18.3 percent at $102.41 after it released promising data from a clinical trial of an experimental multiple sclerosis drug.

UnitedHealth Group Inc's quarterly profit flew past estimates and its shares jumped 7.9 percent to $47.72. The Morgan Stanley healthcare payor index <.HMO> gained 3.6 percent, the most in almost eight months.

Volume is expected to remain light on Thursday before a three-day weekend. U.S. and many global markets are closed on Friday in observance of Good Friday.

As you approach every weekend, there seems to be some concern about being long, said North Star's Kuby. It's becoming part of the dynamic.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)