Rabidwolff's Alehouse
"Your place for fun and knowledge."
HOME | Quotes | SAS | C# | BEER



Basics
FORMATS
INFORMATS
DATETIME
ATTRIB
LENGTH
FORMAT
INFORMAT
LABEL
JOINS
OPERATORS

Statements
RETAIN
FIRST.
LAST.

Procedures
PROC SORT
PROC COPY
PROC CPORT
IF ELSE
PROC REPORT

Functions
CAT
CATS
CATT
CATX

CDISC
Random Q & A

CDISC
CDISC Info

Coded Tools
XML Output
Examples

PROC SORT

  • Used to sort variables
  • Sorts by ascending by default, put ‘DESCENDING’ in front of variables if you want to reverse the sort
  • Missing variables values are defaulted as the smallest of values
  • Key options:
    • “DUPOUT=” Output to a dataset all the duplicate records as sorted by the ‘BY’ variables
    • “DATA=” List the input datasaet here
    • "OUT=" Optional, if not present then the "DATA=" dataset listed will be sorted by the 'BY' variables and overwritten. Otherwise, only the new dataset listed here will be saved with the new sort
    • “NODUPKEY” Delete records that are duplicate records by the ‘BY’ variables
    • “NODUPRECS” Delete records that are duplicates by all variables in the dataset
Click to Show Examples:

Rabidwolff Industries | Establisted: 10/15/2011 | Version: 4 8/4/2012 | Page Last Generatated: 9/25/2021 4:33:46 PM