Contents Up << >>

List

Format: L[ist] [if condition or v[ariables] or vv]
This command lists all the rows of data, or can be followed by an optional condition to list only some of the rows. Alternatively the values of the general purpose variables can be listed.

Examples:

Enter command -  l
Enter command -  LI
These will have the same effect of listing out all the rows.

Enter command -  l if c1<5
This will only list out those rows in which the first value is less than 5.

Enter command -  LIST IF ROW<5
This will only list out the first 4 rows.

Example output:

Listing data lines for which  ROW<5
NO  AGE SEX MSW OCC EMP UK  ADD ETH ADM PC  SYM TIM
1   3   1   2   2   1   1   3   1   1   0   1   2
2   1   1   1   2   2   1   2   1   2   0   1   3
3   3   1   2   3   1   1   3   1   2   0   1   2
4   1   1   1   5   2   1   2   1   2   0   1   3
Columns are listed according to the format currently assigned to that column in terms of column width and number of decimal places displayed. You can alter these with the FORMAT command.

The two sets of general purpose variables can also be listed by using the option VARIABLES, which can be shortened down to V, or the option VV:

Enter command -  LIST VAR
Enter command -  LIST VV
The first will list V1 to V20, the second will list VV1 to VV20.

Example output:

VV1         VV2         VV3         VV4         VV5
1.0000      100.0000    1.0000      50.5000     833.2500

VV6         VV7         VV8         VV9         VV10
28.8661     2.9011      0.0000      0.0000      -1.2361

VV11        VV12        VV13        VV14        VV15
0.0000      0.0000      0.0000      0.0000      0.0000

VV16        VV17        VV18        VV19        VV20
0.0000      0.0000      0.0000      0.0000      0.0000
The LIST command can sometimes be useful to locate certain rows in your data set. For example, suppose that column 23 is supposed to be the total of columns 19, 20, 21 and 22, but that you think you might have entered some of the data wrongly. Then:

Enter command -  l if c23!=(c19+c20+c21+c22)
will output a list of any rows for which the total is wrong. If one column of those rows contains an identification number (or perhaps the row number itself) then one can make a note of which rows are incorrect and then use EDIT to go back to them and change them.

Alternatively the LIST command might be used to locate the row containing a particular value, for example to locate any rows for which the value of GHQ is 23 then one could just enter:

Enter command -  l if GHQ=23