SQR provides internal, reserved variables with values maintained & updated by SQR.

#Current-Line: Current physical line on a page
$Current-Date: Current date time on the local machine when sqr is running.
#Current-Column: Current column on page.
#Page-Count: Current page number (can be reset).
#End-File: set to 1 if end of file occurs.
#Return-Status: value returned to operating system when sqr exits.
#Sql-Count: The # of rows affected by an SQL DML statement.
#Sql-Status: Status value from database after each query is compiled/executed. This value is database dependent.
$Sqr-Database: The database type for which SQR was compiled. Valid values are ORACLE, INGRES, DB2, INFORMIX, SQLBASE, SYBASE and ODBC.
$Sql-Error: Text message of error returned from DBS.
$Sqr-Locale: The name of the current locale being used.
#Sqr-pid: The process ID of the current SQR process.
$Sqr-platform: The hardware/operating system type for which SQR was compiled. Valid values are WINDOWS, VM, MVS, WINDOWS NT, UNIX, and VMS.
$Sqr-program: The name of SQR program file.
$Sqr-ver: The text string shown with -ID flag.