Massive GI bleeding is a resuscitation problem before it is an endoscopy problem. Endoscopy can be definitive, but the patient must survive long enough to get there.
The first priority is physiology. Is the patient in hemorrhagic shock? Is the airway threatened by hematemesis, altered mental status, or ongoing aspiration risk?
Is there coagulopathy? Is the patient anticoagulated? Is perfusion improving?