Use the CLEAR command to remove global variables from memory or table locks.
Options
ALL VARIABLES
Removes all global variables from memory.
dbspec
Specifies the database name.
EXCEPT varlist
Specifies variables that the CLEAR command will not remove. You can use wildcards in variable names.
NOW
CLEAR ALL VAR NOW, the fourth argument to the CLEAR ALL VAR command clears all the variable storage blocks (VSBs), including all printer control code variables and other non-permanent system variables (NPSVs). It re-allocates the blocks with just the permanent system variables (PSVs), #DATE, #TIME, #PI and SQLCODE.
Without the fourth parameter, printer control code variables and other # variables are NOT cleared. Also, it does not completely re-initialize the memory blocks as does the CLEAR ALL VAR NOW.
TABLE LOCKS
Removes all locks on tables. This command parameter must be used with MULTI set to OFF and while connected to the database.
VARIABLES varlist
Removes a list of one or more variables. Use this option at the end of a complete set of procedures to clear variables that are no longer needed. You can use wildcards in variable names.
About the CLEAR Command
When R:BASE is first loaded into memory, only system variables are defined; they are not affected by the CLEAR command. Variables defined in reports are cleared automatically after the report is printed. Other variables you define remain in memory until you exit from R:BASE or use the CLEAR command.
Examples
The following command removes the global variables vcounter and vname from memory.
CLEAR VARIABLES vcounter, vname
The following command removes all global variables from memory.
CLEAR ALL VARIABLES
The following command removes all global variables except var1.
CLEAR ALL VARIABLES EXCEPT var1
The following command clears all variables beginning with the letter v.
CLEAR VARIABLES v%