NEW YORK - Stocks finished moderately higher in an uneven session yesterday as optimism about the economy helped investors overcome some of their uneasiness about the Federal Reserve's decision on interest rates.

The energy sector rose on a 5 percent spike in oil prices, while news that billionaire investor Carl Icahn was seeking to join Motorola Inc.'s board lifted technology stocks.

But fluctuations in the major indexes reflected the market's uncertainty as it waits for the Fed to complete a two-day meeting this afternoon. Market-watchers are expecting the central bank to keep rates unchanged, as it has for the last four meetings after 17 straight increases, because recent economic data have been showing slow, stable growth.

Now that investors have abandoned their hopes for a rate cut anytime soon, many are regarding this year's positive economic reports and the Fed's holding pattern as auspicious for stocks.

"If the Fed feels the economy is strong enough on its own, it means corporate earnings this year will probably be better than people were expecting," said Alfred E. Goldman, chief market strategist at A.G. Edwards & Sons Inc., of St. Louis.

The Conference Board, a business research group, said consumer confidence rose modestly in January as the job market remained strong. That report followed regional Fed reports Monday showing manufacturing growth in the Midwest and Texas.

The Dow Jones industrial average rose 32.53, or 0.26 percent, to 12,523.31.

Broader stock indicators were also higher. The Standard & Poor's 500 index was up 8.20, or 0.58 percent, at 1,428.82, and the Nasdaq composite index rose 7.55, or 0.31 percent, to 2,448.64.

Oil prices shot higher on signs of production cuts from OPEC members. A barrel of light, sweet crude rose $2.96 to settle at $56.97 on the New York Mercantile Exchange. Natural gas soared more than 11 percent on forecasts of frigid weather in the Midwest.

In response to the spike in energy prices, Exxon Mobil Corp. rose $1.19, to $74.39; Chevron Corp. rose $1.54, to $73.07; and ConocoPhillips rose $1.03, to $65.65.

Meanwhile, Motorola rose $1.27, or 6.9 percent, to $19.58 after Icahn revealed his stake in the cell-phone-maker and expressed interest in joining the board.

3M Co., which makes products such as Post-It notes and Scotch tape, reported profit jumped 58 percent after taking a large gain on the sale of its pharmaceutical business. However, the company - often considered a barometer of U.S. business health because of the products it sells - missed Wall Street expectations after stripping out that gain. Its shares fell $4.26, to $74.70.