# List-Style Specification

This optional field allows you a convenient method to specify variables that are numbered sequentially or contain a common prefix when there are more than can be conveniently selected by highlighting the variables in the Available Variables field and using the button. A typical List-Style Specification field is shown below:

List-style specification fields are always associated with a variable field, as illustrated below:

You can use one or the other or both fields to specify the requisite variables. The methods for this specification are described in the table below:

To specify: | Description
All of the variables with a common prefix | Enter the prefix followed by a colon (:) in the List-Style text box. For example, to specify all of the variables in your data set that begin with the prefix var,
| 8 | Type var: in the text box.
All variables beginning with var are specified.
All of the variables with more than one common prefix | Enter each prefix followed by a colon (:) and separated by a space in the List-Style text box For example, to specify all of the variables in your data set that begin with the prefix var and all of the variables that begin with the prefix geno,
| 8 | Type var: geno: in the text box.
All variables beginning with either var or geno are specified. Caution: When specifying variables with different prefixes, using the common prefix notation (_:) can change the order of variables in the output data. If you have more than one prefix for variables, be sure the order of the markers in the data set has been sorted by prefix to avoid unexpected results. If you are unsure of the order, you can specify the variables by position in the data set as described below. In this case, you reference the left-most and right-most variables in the data set separated by a double hyphen. For example, if the first ordered variable in the data set is var1 and the last is geno500, specify var1--geno500.
An inclusive, sequential subset of the variables | Enter the name of the first and last variables separated by a single hyphen. Include no spaces or colons. For example, suppose your data set contains 2500 variables, var1 to var2500, and you want to specify the first 500 variables.
| 8 | Type var1-var500 in the text box.
All of the variables between and including var1 and var500 are specified.
Individual variables | Enter the name of each variable separated by a single space. For example, suppose your data set contains 2500 variables, var1 to var2500, and you want to specify var101, var456 and var1210. Type var101 var456 var1210 in the text box. Separate each variable with a single space. Variables var101, var456, and var1210 are specified.
A non-sequential subset of variables | Enter the name of each individual variable separated by a single space. Enter the name of the first and last variables of each subset separated by a single hyphen. Separate the individual variables from the inclusive subsets with a single space. For example, suppose your data set contains 2500 variables, var1 to var2500, and you want to specify var1, var2400 and all of the variables between var1210 and var2150.
| 8 | Type var1 var1210-var2150 var2400 in the text box.
Variables var1, var2400, and all of the variables between var1210 and var2150, inclusively, are selected You can also specify these variables using both the List-Style Specification field and the associated variable field.
| 8 | Highlight var1 in the available variable field and click to add var1 to the Variables field.
| 8 | Repeat for var2400.
| 8 | Type in the var1210-var2150 in the text box.
Note: This method is especially useful when specifying variables with different prefixes.
Variables by position within the data set | Enter the name of the left-most variable and the right-most variable separated by a double hyphen. For example, suppose your data set contains 5 variables, A1, B2, C3, D18 and F10, and you want to specify B2, C3 and D18.
| 8 | Type B2--D18 in the text box.
Variables B2, C3, and F10 are specified.
All numeric variables | For example, suppose your data set contains 2500 numeric variables, var1 to var2500, and 5 character variables, A1, B2, C3, D18 and F10, and you want to specify all of the numeric variables.
| 8 | Type _numeric_ in the text box.
All of the numeric variables (var1 to var2500) are specified.
All numeric variables between two distal variables | For example, suppose your data set contains 2500 numeric variables, var1 to var2500, and 5 character variables, A1, B2, C3, D18 and F10, and you want to specify only the numeric variables between D18 and F10.
| 8 | Type D18_numeric_F10 in the text box.
All of the numeric variables located between D18 and F10 are specified.
All character variables | For example, suppose your data set contains 2500 numeric variables, var1 to var2500, and 5 character variables, A1, B2, C3, D18 and F10, and you want to specify all of the character variables.
| 8 | Type _character_ in the text box.
All of the character variables (A1 , B2, C3, D18, and F10) are specified.
All character variables between two distal variables | For example, suppose your data set contains 2500 numeric variables, var1 to var2500, and 5 character variables, A1 , B2, C3, D18 and F10, and you want to specify character variables located between var1251 to var2000.
| 8 | Type var1251_character_var2000 in the text box.
All of the character variables located between var1251 and var2000 are specified.
All variables |
| 8 | Type _all_ in the text box.
All of the variables, regardless of type, are specified.

Caution: Using the common prefix notation (_:) could potentially include variables created by SAS procedures, in spite of your intention otherwise. Therefore, it is strongly recommended that you either avoid this notation, or specify the longest prefix possible before the colon to avoid capturing extraneous variables.

Note: If you change your mind and would like to reset the field, click
.