Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Proc Sort [2-2]
SAS Base Exam


Output Option
The Output option creates an output data set for the sorted observations.

Example

Copy and run the SCHOOL data set from the yellow box below.
Picture

Similar to the MEANS procedure, you can add the Output option to the SORT procedure.

Example

Proc Sort Data=School Out=SortedRes;
By Subject Results;
Run;
​The OUT option is added to the SORT procedure.
Picture

This creates an output data set called SortedRes that contains the sorted observations.  
Picture

Important Note

When adding the OUT option to the SORT procedure, the input data set (i.e. SCHOOL) remains unchanged. 
Picture

Key Concept to Remember:

With the present of the OUT option, the input data set remains unchanged.

Exercise
Sort the SCHOOL data set by Results in descending order and save the sorted observations in a new data set called DesResult. 
Next

Need some help?
Get Hint
Get Solution
Fill out my online form.

Home 
​
1 2 3 4 5 6 7
Summary | Final Test | Coding Exercises
Coding Project

Already a member? Go to member's area.