SHOW VARIABLE (Short Name: SHO VAR)
Top  Previous  Next

Use the SHOW VARIABLE command to display the current values and data types of global variables.

showvari

Options

AT scrnrow, scrncol

Defines the screen row and column where the first character of the value of the variable is displayed. Text values are left justified and numeric values are right justified within the display width specified by the =w option. Screen rows range from 1 to 25 and screen columns from 1 to 80.

varname

Specifies a variable to be displayed. You can use wildcards to display variables that match a specific pattern.

=w,h

Specifies a maximum width and number of lines for the display of the variable. Long text variables are displayed on multiple lines. The =w,h option is limited to 30 characters and one line for these data types: CURRENCY, DATE, DATETIME, DOUBLE, INTEGER, NUMERIC, REAL, and TIME. When using the =w,h option for BIT, BITNOTE, LONG VARCHAR, LONG VARBIT, NOTE, TEXT, VARCHAR, and VARBIT variables, you can widen the display and set the total number of lines to display. If h is omitted, the value defaults to the number of lines needed to display the text for LONG VARCHAR, NOTE, TEXT, or VARCHAR data types, and only displays the file type for BIT, BITNOTE, LONG VARBIT, and VARBIT data types.

About the SHOW VARIABLE Command

Use SHOW VARIABLE to include variable values in screen displays in a procedure or command file. After displaying the variable values, R:BASE moves the cursor to the beginning of the next row.

You can also use SHOW VARIABLE with the PAUSE command to help debug command files by tracing the changing values of one or more variables.

Examples

The following command displays all global variables and the system variables #date, #pi, #time, and sqlcode.

SHOW VARIABLE

The following command displays the contents of the vstatusvariable at screen row 10 and screen column 15.

SHOW VARIABLE vstatus AT 10 15

The following command displays the contents of the vaddr2variable starting at row 10 and in column 15. If vaddr2 has a TEXT data type with a length of 30, R:BASE displays only the first 22 characters on line 10. R:BASE displays the remaining characters starting at row 11 in column 15. The setting for SET WRAP affects the display of variables.

SHOW VARIABLE vaddr2 =22 AT 10 15

The following command displays all global variables that begin with the characters "emp." You must use the wildcard characters that are defined by the settings for SET SINGLE and SET MANY.

SHOW VARIABLE emp%