Upbeat earnings and forecasts from blue chips Merck & Co Inc. , General Electric Co. , and McDonald's Corp. also helped boostthe market.
The Dow Jones Industrial Average gained 21 points to 12,574, lifted by only 12 of its 30 components.
Most of the gains for the blue chip average came from Merck, whose shares rose 7% after it lifted its profit forecast for the year, citing "strong performance" across its product lines.
Goldman Sachs also upgraded Merck to neutral from sell on the back of its raised forecasts. The brokerage also said the drug company has handled issues over the expiry of patents better than some of its rivals.
The S&P 500 index gained 0.6 points to 1,448, while the Nasdaq Composite
Tech shares were weighed down as Apple Inc. dropped 1.2%. The tech bellwether said it would delay the release of Leopard, the next upgrade of its Mac operating system, until October.
Stock futures reversed an early negative bias after the release of the March producer price index. While higher prices for food and energy pushed up the headline PPI by 1% last month, core prices were unchanged.
Economists polled by MarketWatch expected the headline PPI to rise 0.8% and the core PPI to rise 0.2%.
Investors have been scaling back expectations that the Fed would soon cut interest rates after minutes from the central bank's last meeting revealed continued concern about inflation.
But with Fed policy orientation also dependent on incoming data, the PPI will rekindle some hope that the Fed has enough leg room to cut rates if needed.
But "Federal Reserve policymakers face a difficult challenge accomplishing both moderate inflation and growth," said Peter Morici, economics professor with the Robert H. Smith School of Business at the University of Maryland, in a note.
"Confronting a Hobson choice of pushing the economy into recession or setting off an inflation spiral, the best policy course will be to do no harm, and leave the economy to its natural dynamics," he said.
Upbeat earnings, forecasts
In spite of overall gloomy expectations for the first-quarter earnings season, several blue chips came up with upbeat news on Friday.
General Electric Co. rose 1% after the bellwether's first-quarter results came in line with analysts expectations. GE also reaffirmed its earnings guidance for 2007.
McDonald's Corp. gained 0.7%. The company said worldwide same-store sales rose 8.2% and said it expects first-quarter earnings of 62 cents, including a 1-cent gain from foreign currency translation. Analysts polled by Thomson Financial on average expect first-quarter earnings of 57 cents per share. Analysts' estimates usually exclude items.
U.S. shares closed higher Thursday, bouncing back from the previous session's sell-off as investors looked past disappointing outlooks from some retailers in a search for bargains.
The dollar weakened against the European and Japanese currencies as traders adjusted their positions ahead of a Group of Seven meeting, with the greenback losing 0.6% against the yen to stand at 118.28 yen.
Oil, meanwhile, strengthened slightly, adding to Thursday's sharp gains on the back of an International Energy Agency report that world oil output fell in March. The May-dated light crude contract climbed 12 cents at $63.97 a barrel in electronic trading.
Among oil majors, BP shares gained 2.3%, with Royal Dutch Shell adding 1.8%.
Also Thursday, Sirius Satellite Radio Inc. and XM Satellite Radio Holdings Inc. said the Justice Department has requested more informatio on their planned merger.
But the two companies' stock received a lift from CBS Corp.'s announcement that it has canceled Don Imus' show in the wake of the talk show host's racially-charged remarks about the Rutgers University women's basketball team.
By Nick Godt