Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index

System Variables

Scroll Prev Top Next More

R:BASE presets certain variables, which exist while the program is running. You can verify these values by typing SHOW VARIABLES at the R> Prompt. These variables are described in the following table:

 

Variable Name

Use

Example of Use

#DATE

Stores the current system date

SET VAR vToday = .#DATE

#TIME

Stores the current system time

SET VAR vTimer = (.#TIME + 10)

#PI

Stores the value of as a DOUBLE data type (3.14159265358979)

SET VAR vNum = (.#PI *.rad**2)

SQLCODE

Holds the result of the previous SQL command

SELECT netamount FROM transmaster +

 WHERE netamount IS NULL

IF SQLCODE <> 100 THEN

 --Perform Task here

ENDIF

 

The IF...ENDIF condition checks if any rows exist. If valid rows are found, SQLCODE is set to 0, and the control passes to the command after ENDIF. If no data is found, SQLCODE is set to 100. A negative number for SQLCODE indicates failure. Based on the value of SQLCODE, the WHENEVER command can be used to call an error-handling routine.

SQLSTATE

Stores a 5-character long return code string that indicates the status of the previous SQL statement. SQLSTATE was added for Oterro compatibility. Values may be set by attached server tables commands or stored procedures. A list of valid SQLState values is part of the Oterro documentation.


#NOW

Stores the current system date and time

SET VAR vRightNow DATETME = .#NOW

RBTI_PRNSETUP

Stores the user's button selection after using the PRNSETUP dialog


RBTI_CEM_FONTSIZE

Can be declared to alter the font size for constraint error messages

SET VAR RBTI_CEM_FONTSIZE INTEGER = 14

RBTI_CEM_FONTCOLOR

Can be declared to alter the font color for constraint error messages

SET VAR RBTI_CEM_FONTCOLOR

TEXT = 'BLUE'

RBTI_ERR_FONTSIZE

Can be declared to alter the font size for general error messages

SET VAR RBTI_ERR_FONTSIZE INTEGER = 12

 

RBTI_ERR_FONTCOLOR

Can be declared to alter the font color for general error messages

SET VAR RBTI_ERR_FONTCOLOR TEXT = 'RED'

RBTI_IMG_FOLDER

Can be declared to define a folder path where all "Open Image" dialogs will initially start. If the RBTI_IMG_FOLDER variable does not exist or contains a non-valid folder path, all open image dialogs will launch within the current folder.

SET VAR RBTI_IMG_FOLDER TEXT = 'C:\TEMP\IMAGES\'

RBTI_EXPORT_FOLDER

Can be declared to define a folder path where Data Browser "Export" dialogs will initially start. If the RBTI_EXPORT_FOLDER variable does not exist or contains a non-valid folder path, all open image dialogs will launch within the current folder.

SET VAR RBTI_EXPORT_FOLDER TEXT = 'D:\EXPORTS\'

RBTI_PRNDEFDIR

Can be declared to define the default directory for the "Print to File" print dialog, before the dialog is launched

SET VAR RBTI_PRNDEFDIR TEXT = 'C:\Temp\'

RBTI_PRNDEFFILE

Can be declared to define the default file name for the "Print to File" print dialog, before the dialog is launched

SET VAR RBTI_PRNDEFFILE TEXT = 'CSI_Log'

RBTI_PRNDEFFILET

Can be declared to define the default output type for the "Print to File" print dialog, before the dialog is launched

SET VAR RBTI_PRNDEFFILET TEXT = 'PDF File'

 

 

With the FEEDBACK operating condition set ON to display processing results, the below commands will create FEEDBACK system variables containing values.

 

7.The data transfer for the JOIN of two tables
9.The data transfer for a PROJECT command
11.SORTing a large record set
12.The data transfer for a SUBTRACT of two tables
14.The UNION command

 

 

The FEEDBACK system variables will be generated and hold the values for the record changes and the elapsed time for the command.

 

Variable Name

Use

RBTI_RowsInserted

Holds the value for the number of rows inserted

RBTI_RowsDeleted

Holds the value for the number of rows deleted

RBTI_RowsUpdated

Holds the value for the number of rows updated

RBTI_ElapsedTime

Holds the value for the elapsed processing time  

 

You can verify these values by typing SHOW VARIABLES at the R> Prompt.