Procedure features: |
APPEND
statement option:
|
SORTEDBY data set option |
|
The following example shows that a sort indicator can be inherited using
the GETSORT option with the APPEND statement.
|
data mtea;
length var1 8.;
stop;
run; |
|
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; |
Sort Information Output
Sort Information
Sortedby DESCENDING var1
Validated YES
Character Set ANSI
This example shows sort indicators using the SORTEDBY data set option
and the SORT procedure.
|
data mysort(sortedby=var1);
length var1 8.;
do var1=1 to 10;
output;
end;
run;
ods select sortedby;
proc contents data=mysort;
run; |
Sort Information Output
Sort Information
Sortedby var1
Validated NO
Character Set ANSI
This example shows the sort indicator information using the SORT procedure.
|
data mysort;
length var1 8.;
do var1=1 to 10;
output;
end;
run;
proc sort data=mysort;
by var1;
run;
ods select sortedby;
proc contents data=mysort;
run;
|
Sort Information Output
Sort Information
Sortedby var1
Validated YES
Character Set ANSI
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.