Epi Info™ User Guide

Classic Analysis


How to Manage Variables

Use the DEFINE Command

This command creates new variables.

Syntax

DEFINE <variable> {<scope>} {<type indicator>} {("<prompt>")}
  1. From the Classic Analysis Command Tree, click Variables > Define. The DEFINE Variable dialog box opens.

    Figure 9.15: Define Variable Dialog Box

     

  2. From the Scope section, select one of the following variables:
    • Standard variables remain in a current project and are one variable in that form. They can assume new values with each record during a file query (e.g., a LIST or FREQ).
    • Global variables persist throughout program execution. They pass values from one form to a related form, and do not change during a file query.
    • Permanent variables are stored in the EpiInfo.Config.xml file or system registry and retain any value assigned until changed by another assignment, or until the variable is undefined. They are shared among Epi Info 7 programs and persist even if the computer is shut down and restarted.
  3. From the Variable Type drop-down list, select one of the following types: Date, Numeric, Text, or Yes-No.
  4. Optional: Variable Type is required and cannot be used if <scope> is omitted. <type indicator> is the data type of the new variable and must be one of the following reserved words: NUMERIC, TEXTINPUT, YN, or DATEFORMAT. If omitted, the variable type will be inferred based on the data type of the first value assigned to the variable. However, omitting field type is not recommended.
  5. Click OK.
Top