Producer prices up in July, but energy costs decline