You are here: Automating Analyzer > Variables > Command-created Variables

Command-created Variables

Some variables are automatically created by Analyzer whenever certain commands are executed. You can use these variables when processing other Analyzer commands. These variables remain in effect for the duration of the current Analyzer session only.

Variables Created by Analyzer Commands

Variable

Value

ABSn

The absolute value of the field used in the last Statistics or Profile command.

AVERAGEn

The mean value of the field described by the last Statistics command.

COUNTn

The number of records tallied with the last Count or Statistics command.

GAPDUPn

The total number of gaps and duplicates detected by the last Sequence command.

HIGHn

The nth largest value encountered with the last Statistics command. You may want to use this variable in an expression to extract the five highest values in a field: AMOUNT > HIGH1.

LOWn

The nth smallest value encountered with the last Statistics command. You may want to use this variable in an expression to extract the five lowest values in a field: AMOUNT < LOW5.

MAXn

The largest value encountered by the last Statistics command.

MINn

The smallest value encountered by the last Statistics command.

MLEn

The total of most likely errors in a sample reported by the Evaluate command.

RANGEn

The difference between the largest and smallest values encountered by the last Statistics command.

SAMPINTn

The sample interval reported by the Size command.

SAMPSIZEn

The sample size reported by the Size command.

STDDEVn

The standard deviation of the fields calculated by the Statistics command.

TOTALn

The total of the values encountered by the last Statistics or Total command.

UELn

The upper error limit in a sample reported by the Evaluate command.

WEEKENDn

The number of date values that fall on weekends (Saturday or Sunday).

WRITEn

The number of records written by any command that outputs a data file.

 

Assigning Variables in Individual Commands

For commands entered individually (as opposed to in groups), the value of n is always 1. Each time you issue a command that creates a variable, the preceding results are overwritten. For example, if you total the quantity on hand, the results are held in the variable TOTAL1. If you then total the unit costs, Analyzer reuses the variable TOTAL1 to hold the results.

To retain automatic variables so that they are not overwritten by subsequent commands, rename the variables after they have been created. For more information, see Maintaining Variables.

Assigning Variables in Groups

When you use groups to issue commands, the results are placed in variables that are numbered consecutively, starting at 2. The value of n increases by one for each command in the group. For example, if the Total command is the third command in a group, the results are held in the variable TOTAL3. Similarly, if you use the Total command to total another field and it is the fifth command in the group, the results are held in the variable TOTAL5. For more information, see Groups.