PURPOSE: This randomized phase III trial is comparing how well ondansetron works with or without dexamethasone in preventing vomiting in patients with cancer who are receiving radiation therapy to the upper abdomen.