Stocks rose on Wednesday as several corporate executives gave positive outlooks that eased concerns about the global recession, while better-than-expected results from AT&T Inc lifted technology shares.

But falling oil prices pressured shares of big energy companies, capping gains on the Dow industrials after government data showed a larger-than expected increase in domestic crude inventories last week. Exxon Mobil Corp was the index's top drag.

JPMorgan recommended that Caterpillar should make up a larger part of investors' portfolios, and the shares rose 6.2 percent to $33.33, making it the top boost to the blue-chip index.

AT&T was up 4 percent to $26.29 after profit fell less than expected, and an analyst said its iPhone partnership with Apple Inc is starting to help rather than hurt profits.

Apple, which reports results after the closing bell, was among the top gainers on the Nasdaq, up 2 percent at $124.27.

It appears the fourth quarter of last year and the first quarter of this year is when the corporate officers dump all their garbage and get everything they can out, said Carl Birkelbach, chairman and chief executive of Birkelbach Investment Securities in Chicago.

The good news is that maybe this is the end of that.

The Dow Jones industrial average <.DJI> gained 62.60 points, or 0.79 percent, to 8,032.16. The Standard & Poor's 500 Index <.SPX> rose 11.21 points, or 1.32 percent, to 861.29. The Nasdaq Composite Index <.IXIC> climbed 31.93 points, or 1.94 percent, to 1,675.78.

Gilead Sciences Inc jumped 8 percent to $47.16 and was the top boost on the Nasdaq after quarterly profit beat estimates on increased sales of its drugs to treat the virus that causes AIDS.

Semiconductor stocks also boosted the Nasdaq following strong quarterly results from SanDisk Corp . The PHLX Semiconductor index <.SOXX> advanced 6.7 percent.

Boeing Co also helped lift the Dow after the big U.S. aircraft maker and defense contractor lowered its full-year outlook, but the range was still above Wall Street's expectations, according to Reuters Estimates. Its shares rose 4 percent at $38.12.

But Morgan Stanley slid 5.6 percent to $23.25 after it posted its second straight quarterly loss and slashed its dividend.

Banks have been a key component in leading the six-week rally that sent the broad S&P 500 up more than 26 percent from March's bear market lows.

Exxon Mobil Corp and Chevron Corp weighed on the Dow as U.S. oil futures prices dropped earlier in the session. Exxon fell 1.5 percent to $65.25, and Chevron was down 0.17 percent at $64.77.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)