Upper GI endoscopy is the preferred diagnostic test in the evaluation of patients with suspected PUD. Endoscopy provides an opportunity to visualize the ulcer, to determine the presence and degree of active bleeding, and to attempt hemostasis by direct measures, if required. Perform endoscopy early in patients older than 45-50 years and in patients with associated so-called alarm features.