CASES Subcommand (LIST command)

CASES limits the number of cases listed. By default, all cases in the active dataset are listed.

  • Any or all of the keywords below can be used. Defaults that are not changed remain in effect.
  • If LIST is preceded by a SAMPLE or SELECT IF command, case selections specified by CASES are taken from those cases that were selected by SAMPLE or SELECT IF.
  • If SPLIT FILE is in effect, case selections specified by CASES are restarted for each split.

FROM n. Number of the first case to be listed. The default is 1.

TO n. Number of the last case to be listed. The default is the end of the active dataset. CASES 100 is interpreted as CASES TO 100.

BY n. Increment used to choose cases for listing. The default is 1.

Example

LIST CASES BY 3 /FORMAT=NUMBERED.
  • Every third case is listed for all variables in the active dataset. The listing begins with the first case and includes every third case up to the end of the file.
  • FORMAT displays the case number of each listed case.

Example

LIST CASES FROM 10 TO 20.
  • Cases from case 10 through case 20 are listed for all variables in the active dataset.