NEW YORK (AP) — Wall Street edged higher Friday after government data indicated Americans' spending rose in April — but only to keep up with rising costs.

After three straight days of gains, investors bought cautiously into the market after the Commerce Department said personal spending rose 0.2 percent last month and personal income rose 0.2 percent. The department also said inflation at the personal spending level, after stripping out food and energy costs, ticked up in April by a tame 0.1 percent.

The readings were in line with the market's expectations, and supported the notion that high commodities costs are not yet causing a sharp pullback in spending or lifting prices for other goods. Meanwhile, the technology sector got a lift after computer maker Dell Inc. and chip maker Marvell Technology Group Ltd. posted stronger-than-expected quarterly results.

But Wall Street's concerns about the economy and inflation are far from erased, despite the stock market's healthy gain this week. Although the government estimated Thursday that first-quarter gross domestic product grew by nearly 1 percent, Americans still face rising costs for necessities such as groceries and gasoline. Furthermore, crude oil remains near record highs.

Investors will get a clearer picture with economic reports to be released next week. Analysts believe strong data on job growth and manufacturing will boost stocks — or, if the reports are disappointing, deliver a setback to the markets.

"It is now all about the economy, and I think we're going to get numbers that might be a requiem for the recession forecasters," said Peter Cardillo, chief market economist at New York-based brokerage house Avalon Partners. "Not to say the numbers will be great, but not as bad as people might have anticipated. That will give the market a lift."

He said some as many investors were adjusting their positions Friday ahead of the data. In midafternoon trading, the Dow Jones industrial average rose 22.55, or 0.18 percent, to 12,668.77.

Broader stock indicators advanced. The Standard & Poor's 500 index rose 4.96, or 0.35 percent, to 1,403.22, and the Nasdaq composite index rose 18.81, or 0.75 percent, to 2,527.13.

All three indexes are poised to finish higher for the week, recovering from the previous week's sharp losses. This week, the dollar stabilized and oil prices pulled back from record highs, giving investors some relief as they parsed data suggesting that the economy is weak but not technically in recession.

Government bonds edged up Friday. The yield on the 10-year Treasury note, which moves opposite its price, fell to 4.03 percent from 4.08 percent late Thursday.

The energy markets continued to weigh on investors' minds, however, with oil prices down from record levels but threatening to surge again.

After a $4-a-barrel tumble in oil helped stocks advance Thursday, crude oil futures rose $1.30 to $127.92 a barrel in erratic trading on the New York Mercantile Exchange.

"We've hit a level where you're starting to see demand destruction," said John Massey, portfolio manager at AIG SunAmerica Asset Management.

The dollar fell against other major currencies, while gold prices rose.

Wall Street will look for signs of how rising inflation is affecting the economy in several reports due next week. The Institute for Supply Management will release an index of conditions in the manufacturing sector on Monday and its services sector report on Wednesday.

The Labor Department on Friday will release its May employment report, one of the most closely-watched indicators of economic health.

In corporate news, the technology-dominated Nasdaq got a boost after Dell, the world's second-largest seller of personal computers, issued a profit report late Thursday that was stronger than analysts expected due to growth in Asia and robust sales of notebook computers.

Dell shares jumped $1.54, or 7.1 percent, to $23.35, and injected some optimism into Wall Street that foreign economies are helping many companies weather the weak U.S. market.

Marvell Technology swung to a larger-than-expected profit in the quarter ended May 3, and its revenue also beat analyst forecasts. Shares rose $3.34, or 23 percent, to $17.44.

The Russell 2000 index of smaller companies rose 1.35, or 0.18 percent, to 746.90.

Declining issues outnumbered advancing issues by about 8 to 7 on the New York Stock Exchange, where volume came to a light 548.3 million shares.

Overseas, Japan's Nikkei stock average closed up 1.52 percent. Britain's FTSE 100 fell 0.24 percent, Germany's DAX index advanced 0.59 percent, and France's CAC-40 rose 0.77 percent.