Updated from 9:26 a.m. EDT

Chain-store sales largely held up in July, according to retail reports out Thursday, as scorching heat sent shoppers out to buy summer goods despite rising gas prices and interest rates. Several specialty chains, though, reported weakness, and the overall results failed to impress.

Research firm Retail Metrics reported that its index tracking same-store sales at over 70 major retail chains rose 3.6% in July from the same month last year, falling just shy of expectations for a 3.7% gain.

"This is a decent number that shows consumer spending is still holding up relatively well given all the macroeconomic forces that are weighing on it," says Ken Perkins, president of Retail Metrics. "I wouldn't categorize these results as disappointing at all, but it does look like the industry is breaking down to show who is executing and who is not."

J.C. Penney

(JCP) - Get Report

, for one, executed in July, boosting the department store space. In specialty retailing,

Gap

(GPS) - Get Report

continued to struggle and

Ann Taylor

(ANN)

was unable to meet Wall Street's lofty expectations.

Wal-Mart

(WMT) - Get Report

confirmed that its July same-store sales rose 2.4%. Total sales for the month surged 12.5% to $25.66 billion. The world's largest retailer said its early efforts to move back-to-school merchandise bore fruit.

"Our customers continued to prioritize spending on food and consumables, and they responded early to price breaks for essential back-to-school supplies," Tom Schoewe, Wal-Mart's chief financial officer, said in a statement. "We were pleased with early customer reaction to fashion basics and room solutions for back to college."

Wal-Mart forecast that August comparable sales in the U.S. will rise 1% to 3%. As the key month for back-to-school shopping -- which can also be an indication of how retailers will fare in the all-important holiday season -- August will be a major test for consumers as they grapple with a softening housing market, a continued rise in energy prices, higher interest rates and a slowing economy.

Wal-Mart's chief competitor

Target

(TGT) - Get Report

reported its same-store sales, or comps, gained 3.1%, hitting the low end of its range. In mid-July, the No. 2 discount chain lowered its forecast for the month to a range of 3% to 4%, down from its initial estimate of 4% to 6% growth.

Despite the soft sales results, Target said it expects second-quarter earnings to meet or exceed the Thomson First Call average analyst estimate of 69 cents a share.

For warehouse retailer

Costco Wholesale

(COST) - Get Report

, July same-store sales climbed 7%. Total sales jumped 11% to $4.48 billion.

Smaller rival

BJ's Wholesale Club

(BJ) - Get Report

reported a 1.9% rise in sales on a comparable-club basis, including a 1.1% contribution from gasoline sales. Total sales rose 5.4% to $613.3 million from $582.1 million.

In the department store division, J.C. Penney reported a same-store sales rise of 4.9%, with total department store sales up 5.5%. Penney said that all merchandise divisions had sales gains, with the best divisional performances in family shoes, women's accessories and men's apparel.

Federated

( FD) , the owner of Macy's and Bloomingdale's, said comp sales for last month rose 3.3%. Total sales in July jumped 61% to $1.61 billion, an increase that was influenced by the company's merger with May Department Stores.

Meanwhile, clothing seller Gap was among the specialty chains posting weakness. The company projected second-quarter earnings well below Wall Street's expectation after yet another comps decline. The operator of Gap, Banana Republic and Old Navy stores said its second-quarter earnings would be 13 cents to 15 cents a share. Wall Street is expecting a profit of 22 cents a share. For July, total sales rose 1% to $1.05 billion, but same-store sales declined 4%.

"We put a strategic plan in place this year to improve product, refresh stores, and support our brands to achieve better results in the second half of the year and beyond," said Sabrina Simmons, senior vice president, treasury and investor relations, in a press release. "As part of this plan, Gap and Old Navy decided to take aggressive markdowns in July to clear product and enable a clean presentation of fall assortments, which arrived late in the month. This resulted in July merchandise margins significantly below last year."

Gap's second-quarter sales were $3.72 billion, unchanged from a year ago. Separately, Gap's board agreed to set aside an additional $750 million for the company's stock buyback program. The company's shares recently were down 84 cents, or 4.9%, to $16.28.

Women's wear chain Ann Taylor said its comps climbed 5.1%, but analysts, on average, had expected a 9% gain. Its stock was recently off $1.02, or 2.5%, to $39.04.

Pacific Sunwear

(PSUN)

, an apparel seller, also cut its estimates for the second quarter after posting weaker-than-expected sales in July. The company now believes it will earn 14 cents to 15 cents a share for the quarter, well short of the 20-cent consensus estimate. Last month's same-store sales declined 10.6%, and total sales fell 5% to $102.4 million. Shares sank $1.13, or 6.9%, to $15.30.

Aeropostale

(ARO)

lowered its earnings projections after posting an unexpected comps decline of 1.9% for July, which comes on top of last year's 4.2% drop. The company expects to report earnings of 12 cents to 13 cents a share, excluding a 2-cent gain related to an intellectual property settlement. The company's prior guidance called for earnings of 15 cents to 17 cents a share. Shares recently were down $1.60, or 6.4%, to $23.51.

Other teen apparel retailers fared better.

American Eagle Outfitters

( AEOS) said its comps rose 7% in July thanks to a strong start to its back-school campaign. The company raised its second-quarter earnings guidance to a range of 45 cents to 46 cents a share, up from an earlier estimate of 41 cents to 43 cents. Analysts were expecting earnings of 43 cents a share, according to First Call.

Abercrombie & Fitch

(ANF) - Get Report

reported its July comps rose 3%, in line with Wall Street's estimates. Shares were up $2.24, or 4.3%, to $54.85.

Home furnishings chain

Pier 1 Imports

(PIR) - Get Report

continued to flail, with its same-store sales for July dropping 14.9%. Total sales slid nearly 13% to $113.1 million.

"Economic pressures continue to bear down upon the demand side of the industry, and a growing number of consumers are getting picky about price and value," said Richard Hastings, retail analyst with Bernard Sands, in a note to clients. "Offsetting these concerns is the strength of the job market, helping sustain shopping when promotion and value hit the right notes. For many other shoppers, wages and wealth are great and none of these pressures matter."