System block variables

System block variables provide an easy way to reference specific information about the system, the data being worked on, and the active user's session, among other useful pieces of information.

While the 1010data Macro Language allows you to define your own block variables, there are system block variables that are defined for you.

The following is a list of system block variables may be referenced in block code.

System block variable Description
@accum_mach_ Internal designation of server on which accum is running.
@accum_port_ Internal designation of port number for accum handling data.
@basetable_ The table on which a query was invoked and/or the base table if a simple <base> was used before the rest of the query.
Note: Using the <base> tag in a <block> will not change the current value of @basetable_. @basetable_ only makes sense in the simplest of queries and should probably be avoided.
@browser_type_ The name of the browser in use by the current session.
@browser_version_ The version of the browser in use by the current session.
@gmtoffset_ The user's preferred time zone with Daylight Saving Time (DST) taken into account

@gmtoffset_ provides a correction to GMT in the U.S. that takes into account DST (as observed in NYC).

Available as of version 10.14.

@lastlogin_ A decimal value (in date+time form) of the login date and time for the current user's last session (adjusted with @gmtoffset_).

Available as of version 10.14.

@logindate_ An integer value (in date form) of the login date for the current user's session (adjusted with @gmtoffset_).
@logindatetime_ A decimal value (in date+time form) of the login date and time for the current user's session (adjusted with @gmtoffset_).
@logintime_ An integer value (in time form) of the login time for the current user's session (adjusted with @gmtoffset_).
@now_ The current date and time in Julian date format (adjusted with @gmtoffset_).
@origtable_ Path of the table first used at the beginning of a query.
@origtitle_ The name/path of the originating table.
@params_ A package containing constant parameter values (literals, such as numbers and strings), keyed on the parameter name. For non-literal expressions, the value is not available in params_. Instead, use sqlvalues_.

PARAMS(('foo','abc'),('bar','3.14'))

In the PARAMS package above, @params_.foo will contain the literal abc, but @sqlvalues_.foo will contain the MDB expression for the string. @params_.bar will contain the literal 3.14 but @sqlvalues_.bar will contain the MDB expression that yields that number.

@queryhash_ A text value representing the hash value of the current query.
@specialhash_ A text value representing the special hash value.
@sqltypes_ Contains the SQL types for the values in sqlvalues_.
@sqlvalues_ Contains MDB expressions corresponding to SQL expressions. sqlvalues_ provides a convenient way of passing SQL columns into macro code.
@subtitle_ The subtitle of the current table if present, otherwise returns na.
@suffix_ The text value appended to the names of all real columns in the base table, as supplied by the suffix attribute to the <base> operation.
Note: The suffix_ variable has been deprecated. Do not use for new Macro Language code. Use the params_ variable, described above, to identify base suffixes and apply them as needed.
@timezone_ An integer value representing the user's preferred time zone.
@title_ The title of the current table.
@today_ The current date (adjusted with @gmtoffset_).
@username_ Username of user logged into current session.
@verdate_ The date that the version of the current session was released.
@version_ The version of 1010data in use by the current session.