Costco Wholesale Corp. posted a sharp increase in sales for October, helping offset sluggishness from teen retailer Buckle Inc. and other chains battling a tough retail environment.

The discount warehouse chain has been a standout of late among retailers and said Thursday that its sales for the month increased 7%, excluding gasoline, driven by strength at its fresh food, hardware and home furnishing segments, among others.

Analysts polled by Thomson Reuters had expected Costco, which has a hefty weighting in its sales index, to post a 5.5% increase. Costco's beat helped push the sales index above expectations for the month, but Gap Inc., another major component, is expected to post a 1.9% drop in sales after the market closes.

Many apparel retailers in particular have been battling steep and persistent drops in store traffic as shoppers make more purchases online. The traffic decline is weighing on sales and prompting chains to slow store openings.

Thursday's sales reports offer a preview of the quarterly reports from retailers that are due to begin rolling in next week. Macy's Inc. kicks off the earnings season for department stores on Wednesday, while Wal-Mart Stores Inc. is set to report Thursday.

But a number of companies, including Kohl's Corp. and Ann Inc., have already warned that their sales won't meet expectations.

All eyes in the industry will then turn to Black Friday weekend to see if retailers are able to drive traffic with attractive promotions and ever-earlier store openings.

Ken Perkins of Retail Metrics said in a research note that October sales weren't as bad as feared. He was surprised, however, that they weren't stronger given recent signs of economic recovery.

"Unseasonably warm weather throughout the month coupled with uninspiring fashion were clearly a headwind to already struggling apparel sales," Mr. Perkins said.

He added shoppers are increasingly driven by events such as back-to-school season and holidays, and October falls in between the two largest shopping seasons of the year.

Overall, the seven retailers tracked by Thomson Reuters reported 2.7% growth in October sales, excluding newly opened and closed stores. Thomson Reuters forecast the eight companies, including Gap, to record 2.5% growth on top of a 3.7% increase a year earlier.

Many retailers, including the major department stores and most big-box retailers, stopped reporting monthly metrics some time ago, making it difficult to get a snapshot of the health of the entire industry.

L Brands, formerly Limited Brands, said sales jumped 3% last month, beating consensus estimates for a 2.4% increase. Growth was led by a 5% increase in sales for the company's Bath & Body Works brand, which topped expectations for 3.6% growth.

Meanwhile, the Victoria's Secret brand recorded flat sales, missing expectations for a 1.8% increase.

Among teen retailers, Zumiez Inc., which sells action sports-related apparel, footwear, and equipment, reported a 3.1% increase in sales, topping expectations for 2.3% growth.

Teen retailer Buckle, meanwhile, said sales dropped 4.4%, missing analysts' projections for 2.3% decline.

Discount retailer Fred's Inc. said sales fell 1.4%, compared with expectations for a 1.8% increase. The company said its sales were hurt by warmer weather and changes to its layaway program, as well as pressure on clearance margins that have driven its recent losses.

Write to Chelsey Dulaney at chelsey.dulaney@wsj.com

Access Investor Kit for The Buckle, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=A591&isin=US1184401065

Access Investor Kit for Costco Wholesale Corp.

Visit http://www.companyspotlight.com/partner?cp_code=A591&isin=US22160K1051

Access Investor Kit for Gap, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=A591&isin=US3647601083

Subscribe to WSJ: http://online.wsj.com?mod=djnwires