I suppose, you want to know what is the refund you will get on cancellation of your waitlisted ticket 2 hrs before departure of train.
You will be refunded entire amount except for clerkage charges of Rs.20. If it is an e-ticket, it will be cancelled automatically and the money will be refunded into your account used for making the payment.