L (list)

<< Click to Display Table of Contents >>

Navigation:  Reference > Commands >

L (list)

The form of the L (list) command is one of the following:

L 'text' . table,

L x . x . ... ,

LCSV [(extra)] x . x . ... ,

where x is either a variable or text. Any table or variable must previously have been defined in the code.

The L (list) command cannot be used with MINSHOW .

The L (list) command is used to provide a report on the state of the data or tables during execution. When a L (list) command is encountered, text and/or the value(s) of table or variable are written to the output file.

L (list) output will be placed in the Report file and lines which exceed RPTSPL characters will be broken into two or more lines.

LCSV (list comma separated value) output will be placed in the .CSV file and only lines which exceed 10000 will be broken into two or more lines.

Optionally, LCSV can be followed by extra facilities separated by a comma:

(H) causes a header row to output to the CSV file the first time an LCSV command is executed in a run.

(T) causes a tab-delimited file to be output instead of a comma-delimited file.

(H,T) both of the above.

For svar and mvar variables the number(s) of the true bits are listed.

For svar and mvar variables the name can be preceded by an ampersand (&). This causes the response texts to be listed instead of the response numbers.

When a table is listed, the values are enclosed in parentheses and separated by commas. When used in conjunction with run control parameter STRIPRPT, the Report file output can be used in a CL script as a table of constants.

When listing a table, CL will honour formats PTR (Print Total Row) and PTC (Print Total Column).

An alternative form of the L (list) command is EL. In addition to the reporting function, it increments the error variable $XIERR, see section Reserved variable names

A summary of the number of times each L (list) command was executed (a summary of errors encountered in the data) appears in the Report file. The summary also shows as a percentage the frequency of each error's occurrence.

If F=NVNL (No Variable Names in List), then the name of the variable is not printed in the listing: just the value is produced.

If F=NVWL (No Variable Width in List), then the output field width for variable values is fixed, so that the output Report file can be sorted.

Examples of L (list) commands:

l 'Factors'.#fac,

l $15,

l 'Age'.&$age,

if $46-49/b, l 'Cols 46-49 blank',

l $27.$mvar.$28.'Rubbish',

lcsv $iobs.$q1,

lcsv(h) $iobs.$weight,