Stocks rose Friday, bolstered by gains in the bond market after a government consumer price report showed moderate inflation.

The Dow Jones industrial average rose 17.81 to 3,768.71, adding 21.69 for the week.Advancing issues outnumbered decliners by about 3 to 2 on the New York Stock Exchange. Big Board where volume totaled a moderate 249.2 million shares, down from 275.67 million on Thursday.

The NYSE's composite index rose 1.46 to 254.77. The Nasdaq index rose 3.41 to 731.61. The American Stock Exchange's market value index added 0.45 to 443.70. The Standard & Poor's 500 list added 3.06 to 461.94.

The 30-year bond was up nearly 5/8 point and yielding 7.49 percent.

Both markets rose after the Labor Department said its consumer price index rose 0.3 percent in July, boosted primarily by gasoline prices. The number was in line with analysts' expectations.

The so-called "core" CPI rate, minus the volatile food and energy sectors, rose 0.2 percent, less than the expected 0.3-percent increase.

The CPI data came after a Thurs-day report that wholesale prices rose a stronger-than-expected 0.5 percent.

Most analysts agreed that it would not deter the Federal Reserve from raising short-term interest rates next Tuesday at its Federal Open Market Committee meeting, in a bid to head off future inflation.

But James Solloway, research director at Argus Research Corp., said it might persuade the Fed to tighten just 0.25 percent, instead of the 0.50 percent that had been feared as recently as Thursday.

"I think that there's a sigh of relief," Solloway said. "We were set up here for a pretty bad day if the CPI did not show the sort of restrained performance that we got.

"So I think that while it doesn't necessarily forestall a move by the Fed to raise interest raise, it does increase the chance that it will be a quarter point instead of a half."

Meanwhile, the Commerce Department reported that U.S. business inventories rose 0.4 percent in June, following a revised 1.2 percent increase in May. And the Atlanta Federal Reserve said its index of national industry activity fell to 16.0 in July from 22.8 in June, further supporting the notion that economic growth is moderate.

Many economically sensitive stocks rose. With "the economy . . . doing rather well, cyclical companies are the ones that are coming in with the good profits," said Hildegard Zagorski, equities researcher at Prudential Securities.

Caterpillar added 21/8 to 1051/8 after the company said its worldwide sales and profits will be stronger than expected, and that a labor strike would have little impact on third-quarter results.

Interest-sensitive issues also rose as it became less likely that the Fed meeting would produce a sharp rise in interest rates. Utility stocks rose, and the Dow Jones utility average added 1.32, or 0.70 percent, to 188.97.

Renewed takeover rumors in the food sector, notably of CPC International and Heinz, lifted food stocks. CPC added 13/4 to 517/8, and Heinz rose 11/8 to 371/8. General Mills advanced 1 11-32 to 53 31-32.

Exxon rose 21/8 to 601/4 after a federal jury ordered the company to pay $286.8 million in compensatory damages for losses they suffered as a result of Exxon's 1989 Valdez oil spill. The figure was significantly lower than the $895 million that plaintiffs had asked for, and led some analysts to believe that the jury will drastically lower its award on claims of $15 billion in punitive damages as well.