Gel-forming substance used as a setting agent in jams