I'm assuming you were refering to the variable "l_seq", but in your code this variable is not used anywhere.
How abt trapping the CTrl-C and taking appropriate actions - would that help?
DO ON STOP UNDO ,RETRY
ON ERROR UNDO, LEAVE:
IF RETRY THEN DO:
MESSAGE 'CTRL-C Pressed'...