Statics can be used only within Form....EndForm. Is there any similar thing which can be used outside Form so that one can persist data between calls to the subroutine
Static Local Data Objects
If you want to keep the value of a local data object after exiting the subroutine, you must use the STATICS statement to declare it instead of the DATA statement. With STATICS you declare a data object that is globally defined, but only locally visible from the subroutine in which it is defined.
But if you want to have a varibale outside the subroutines which persists their values between subroutine calls,it is better to define them as global variables and they will be available.
In case you have any further clarifications,do let me know.