Call a procedure

I need to call a procedure that runs only when I request, then when it is finished it returns back to the point where It was called, but it must keep the value of all variables.