Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > S

SHOW VARIABLE (Short Name: SHO VAR)

Scroll Prev Top Next More

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

 

SHOW_VARIABLE

 

Options

 

ASC

Specifies to sort the variable output alphabetically in ascending order

 

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. This option is for R:BASE for DOS only.

 

DES

Specifies to sort the variable output alphabetically in descending order

 

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. Wildcards can be specified as part of the variable name with the width and line number parameters.

 

About the SHOW VARIABLE Command

 

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

 

You can also use SHOW VARIABLE or 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 displays all variables in descending order.

 

SHOW VARIABLE DES

 

The following command displays the contents of the vMessage variable. If vMessage has a TEXT data type with a length of 50, R:BASE displays the first 25 characters on the first line, and the remaining 25 characters on the second line.. The setting for SET WRAP affects the display of variables.

 

SHOW VARIABLE vMessage =25

 

The following command displays the contents of the vaddr2 variable 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." The wildcard characters defined by the SET SINGLE and SET MANY settings must be used.

 

SHOW VARIABLE emp%

 

The following command sorts all variables beginning with "vCust" in ascending order. The wildcard characters defined by the SET SINGLE and SET MANY settings must be used.

 

SHOW VARIABLE vCust% ASC