Skip to Main Content
Base SAS 9.4 Procedures Guide, Third Edition
book

Base SAS 9.4 Procedures Guide, Third Edition

by SAS Institute
August 2014
Intermediate to advanced content levelIntermediate to advanced
2218 pages
209h 16m
English
SAS Institute
Content preview from Base SAS 9.4 Procedures Guide, Third Edition
Program Description
The following example shows that a sort indicator can be inherited using the GETSORT
option with the APPEND procedure.
Create a "shell" data set that contains no observations.
data mtea;
length var1 8.;
stop;
run;
Create another data set with the same structure, but with many observations. Sort
the data set.
data phull;
length var1 8.;
do var1=1 to 100000;
output;
end;
run;
proc sort data=phull;
by DESCENDING var1;
run;
proc append base=mtea data=phull getsort;
run;
ods select sortedby;
proc contents data=mtea;
run;
A sort indicator is being created using the SORTEDBY data set option.
data mysort(sortedby=var1);
length var1 8.;
do var1=1 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Base SAS 9.4 Procedures Guide, Second Edition

Base SAS 9.4 Procedures Guide, Second Edition

SAS Documentation
Oracle® Database 10g Insider Solutions

Oracle® Database 10g Insider Solutions

Arun Kumar R., John Kanagaraj, Richard Stroupe

Publisher Resources

ISBN: 9781629593043