preserve. set printback=on. * SIMPLE AND COMPLEX RANDOM ASSIGNMENT IN EXPERIMENTAL DESIGNS Valentim R. Alferes, University of Coimbra (Portugal), 2009. * PerInt.sps - Random permutation of n integers. set printback=off. new file. input program. * Replace "?" with the number of integers to permute. loop Integer=1 to ?. end case. end loop. end file. end input program. execute. set seed random. compute rn=rv.uniform(0,1). sort cases by rn(a). formats all(f8.0). oms/select tables/if commands=["summarize"] subtypes=["case processing summary"]/destination viewer=no. summarize/tables=integer/format=list nocasenum nototal /title='Random Permutation'/cells=none. restore.