System variables created by Analytics commands
When you execute certain commands, either by entering information in dialog boxes in Analytics or by running scripts, system variables are automatically created by Analytics. You can use these variables, and the values they contain, when processing subsequent Analytics commands.
The value in a system variable is replaced with an updated value if you execute the same command again.
Analytics system variables lists the system variables created by Analytics.
Note
System variables, and the values they contain, are retained for the duration of the current Analytics session only.
Displaying the current value of variables
You can use either of the following methods to display the names and current values of all variables in an Analytics project, including system variables:
- Select the Variables tab in the Navigator
- Enter DISPLAY VARIABLES in the command line
Incrementally numbered system variables
For system variable names that include n in Analytics system variables, n is always 1 if commands are executed outside a group – for example, TOTAL1.
If you use a group to execute multiple commands, any system variables that result are numbered based on the line number of the command that creates the variable. The first command in a group is considered to be on line number 2.
For example:
- If the TOTAL command is the third command in a group, the results are contained in the variable TOTAL4.
- If a second TOTAL command is the fifth command in the group, the results are contained in the variable TOTAL6.
If you need multiple versions of the same system variable in a script, create a group. For more information, see GROUP command.
Analytics system variables
The table below lists the Analytics commands that automatically create system variables, and the values assigned to the variables.
Command | System variable | Assigned value |
---|---|---|
Any command that outputs a table or a file | WRITEn | The number of records in the output table or file. |
Any command that outputs an Analytics table | OUTPUTFOLDER |
The path to the Analytics project folder in the Navigator that contains the output table. This DOS-style path uses the format /foldername/subfoldername, in which the initial slash (/) indicates the root level in the Overview tab. Tip Use the SET FOLDER command to specify a different output folder or to create a new output folder. |
COUNT | COUNTn | The number of records tallied. |
DISPLAY VERSION Analytics version numbers use the format major.minor.patch |
ACL_Ver_Major | The major version of Analytics that is currently running. |
ACL_Ver_Minor | The minor version of Analytics that is currently running. | |
ACL_Ver_Patch | The patch version of Analytics that is currently running. | |
ACL_Ver_Type |
The edition of Analytics that is currently running:
|
|
DUPLICATES | GAPDUPn | The total number of duplicates. |
EVALUATE | MLEn |
Monetary unit sampling Most Likely Error amount (projected misstatement) Record sampling Upper error limit frequency rate (computed upper deviation rate) |
UELn |
Monetary unit sampling Upper Error Limit amount (upper misstatement limit) |
|
EXECUTE | RETURN_CODE |
The code returned by an external application or process run using the Execute command. Return codes are numbers generated by the external application or process and sent back to Analytics to indicate the outcome of the external process. Analytics does not generate the return code. Typical return codes are integer values that map to specific notifications or error messages. For example, the return code "0" could mean "The operation completed successfully". The return code "2" could mean "The system cannot find the file specified". Specific return codes and their meanings vary depending on the external application or process. Lists of return codes, also called 'error codes' or 'exit codes', and their meanings, can often be found in the documentation for the associated external application. Lists of return codes can also be found on the Internet. The RETURN_CODE variable is created when the Execute command is used synchronously, but not when the command is used asynchronously. |
FUZZYDUP | GAPDUPn | The total number of fuzzy duplicate groups. |
GAPS | GAPDUPn | The total number of gaps. |
SEQUENCE | WRITEn | The number of sequence errors. |
SIZE | SAMPINTn | The required sample interval. |
SAMPSIZEn | The required sample size. | |
STATISTICS Note If you run the STATISTICS command on more than one field simultaneously, the system variables contain values for the first field you specify. |
ABSn | The absolute value of the first specified field. |
AVERAGEn | The mean value of the first specified field. | |
COUNTn | The number of records tallied. | |
HIGHn |
The 5th highest value in the first specified field. The 5th highest is the default setting. The setting can be changed using the # of High/Low option in the Statistics dialog box. Note When Analytics identifies the highest value, duplicate values are not factored out. For example, if values in descending order are 100, 100, 99, 98, the 3rd highest value is 99, not 98. |
|
LOWn |
The 5th lowest value in the first specified field. The 5th lowest is the default setting. The setting can be changed using the # of High/Low option in the Statistics dialog box. Note When Analytics identifies the lowest value, duplicate values are not factored out. For example, if values in ascending order are 1, 1, 2, 3, the 3rd lowest value is 2, not 3. |
|
MAXn | The maximum value in the first specified field. | |
MEDIANn | The median value in the first specified field. | |
MINn | The minimum value in the first specified field. | |
MODEn | The most frequently occurring value in the first specified field. | |
Q25n | The first quartile value (lower quartile value) in the first specified field. | |
Q75n | The third quartile value (upper quartile value) in the first specified field. | |
RANGEn | The difference between the maximum and minimum values in the first specified field. | |
STDDEVn | The standard deviation of the first specified field. | |
TOTALn | The sum total of the values in the first specified field. | |
TOTAL | TOTALn | The sum total of the values in the first specified field. |
VERIFY | WRITEn | The number of data validity errors. |
Other system variables
The following variables are system-generated but not created by commands:
- OUTPUTFOLDER the current Analytics project output folder