US retail sales in July were flat with the month before as consumers continued to cut back on discretionary spending on items such as clothing.