SORT CASES

SORT CASES reorders the sequence of cases in the active dataset based on the values of one or more variables.

SORT CASES [BY] varlist[({A**})] [varlist...] 
                         {D  }            
  [/OUTFILE='filespec' [INDEX={NO**} [SIZE={DEFAULT**}]]]
                              {YES }       {value    }

 [/PASSPROTECT PASSWORD={'password'}  [ENCRYPTEDPW={NO**}] ]
                        {NONE**    }               {YES }

**Default if keyword omitted

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SORT CASES command can be generated from the Sort cases dialog.

Release History

Release 17.0

Release 20.0

Release 21.0

Example

SORT CASES BY DIVISION (A) STORE (D).