You are here: Analyzer Concepts > Additional Operations and Routines > Variables

Variables

Analyzer uses two kinds of variables: system variables and user-created variables.

System or Command-created variables store data generated by Analyzer commands for use in other commands. Some system variables appear in the Command Log and in graphs, such as Count and Total. Others remain in the background, saving the results of commands such as Statistics and Profile. You cannot change the properties of system variables.

User-created variables are similar to system variables, but their values are determined by the user as data is processed. Variables can be used in place of fields wherever a field name would be valid, and their values can be assigned conditionally. Like fields, they can be deleted, renamed, exported, and extracted.

Variables are different from fields in one important way: their value changes only if you explicitly alter or delete them.

You can create permanent variables in an Analyzer Project file by giving them names that start with the underscore character (_). Permanent variables let you store constants in your applications.

Uses for Variables

There are three principal uses for variables:

To specify constants for use in an application, such as a sampling interval
To provide special information to Analyzer, such as automatic page headers and margins
To perform calculations that span records and retain information from previous records in programmable applications that use groups

For more information see Variables.

Macro Substitution

Macro substitution is a technique for using character variables to specify parameters for commands in procedures. Macros can contain any text, multiple words or symbols, whole expressions or commands or parts of names. For more information see Macro Substitution.