Retailers posted July sales below analysts' expectations in the latest sign that skittishness about high unemployment and the economy in general are causing consumers to cut spending and focus on essentials.

Some retailers that did manage to eke out gains, including several department stores, did so by taking customers from rivals, rather than from an increase in overall spending.

The 28 retailers tracked by Thomson Reuters reported a 2.9 percent rise in July sales at stores open at least one year, missing Wall Street forecasts of 3.1 percent. Of those, 17 reported lower-than-expected sales, while nine beat estimates.

The Standard & Poor's Retail Index <.RLX> fell 0.4 percent in early trading.

Department store operators Macy's Inc and Kohl's Corp both beat expectations, benefiting from their efforts to ramp up higher-margin exclusive lines.

Macy's reported a 7.3 percent increase in same-store sales, crediting a strong performance by its upscale Bloomingdale's chain and its program that allows stores to choose merchandise to cater to local tastes.

But overall, the U.S. consumer still hesitates to spend money.

We are now in an environment where the dollars in consumers' pockets are fewer, so the competition for those dollars has increased, said Lawrence Creatura, portfolio manager at Federated Clover Investment Advisors.

U.S. consumer sentiment hit its lowest level in nine months in July on bleak prospects for jobs and income, according to Thomson Reuters/University of Michigan's Surveys of Consumers. On Thursday, the government reported that new U.S. claims for unemployment benefits unexpectedly rose in the latest week.

DEPARTMENT STORE DISAPPOINTMENT

Among the retailers that disappointed were JC Penney Co Inc -- whose shares fell more than 6 percent -- and Dillards Inc . Both chains reported unexpected same-store sales declines for July.

The weakness extended to other sectors as well. Off-price retailer TJX Cos Inc missed the mark, in a rare disappointment.

July was the 11th straight month of improving sales, compared with a year-earlier drop of 5.1 percent, according to Thomson Reuters data.

But analysts have also noted that year-earlier comparisons will get tougher in the fall and the key holiday selling season.

Teen apparel retailers suffered some of the worst disappointments as a large build-up in inventory led to discounting as shoppers waited to see what back-to-school discounts they can get in August.

Hot Topic Inc sold fewer higher-ticket items and increased promotional spending, reporting a 9 percent decline in same-store sales, while analysts had expected a 2.6 percent drop. It also forecast a bigger quarterly loss than Wall Street was expecting.

Same-store sales at The Buckle and Wet Seal similarly fell far short of estimates.

If one was a teen apparel retailer, the promotions absolutely hurt the comp and second-quarter earnings, Wall Street Strategies analyst Brian Sozzi said in a research note.

Discounters and off-price retailers were expected to show the best gains for July.

Warehouse club operator Costco Wholesale Corp benefited from that consumers' anxiety about the economy, beating forecasts with a 6 percent same-store sales jump.

But other discount chains such as Target Corp and BJ's Wholesale Club Inc missed, despite showing strength in staples such as food.

Drugstore chain operator Walgreen Co on Wednesday reported a weaker-than-expected rise in same-store sales for July, citing sales of lower priced-generic drugs and decreased sales of flu remedies. Rival Rite Aid Corp reported a 1.1 percent fall in July same-store sales last week, blaming the same trends.

(Reporting by Phil Wahba; Additional reporting by Brad Dorfman and Dhanya Skariachan; Editing by Lisa Von Ahn)