Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > C

CLEAR (Short name: CLE)

Scroll Prev Top Next More

Use the CLEAR command to remove global variables from memory, static variables from a database, or clear table locks.

 

CLEAR

 

Options

 

ALL VARIABLES

Removes all global variables from memory.

 

EXCEPT varlist

Specifies variables that the CLEAR command will not remove. You can use wildcards in variable names.

 

NOW

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. The NOW argument is specific to DOS versions of R:BASE.

 

STATICVAR varlist

Clears a list of one or more static variables. You can use wildcards in variable names. Static variables are created with the SET STATICVAR command.

 

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. 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%

 

The following command clears the vStartDate static variable.

 

CLEAR STATICVAR vStartDate