Specifies to perform an implicit automatic sort when SPD Server encounters a BY clause for a given table.
Valid in: | SPD Server |
Default: | YES |
Interaction: | Corresponding macro variable is SPDSBSRT. |
sorts the data based on the BY columns and returns the sorted data to the SAS client. This powerful capability means that the user does not have to sort data using a PROC SORT statement before using a BY clause.
does not sort the data based on the BY columns. This might be desirable if a DATA step BY clause has a GROUPFORMAT option or if a PROC step reports grouped and formatted data.
libname sport sasspds 'mylib' host='samson' user='user19' passwd='dummy2'; PROC FORMAT; value dollars 0-99.99="low" 100-199.99="medium" 200-1000="high"; run; data sport.racquets; input raqname $20. @22 weight @28 balance $2. @32 flex @36 gripsize @42 string $3. @47 price @55 instock; datalines; Solo Junior 10.1 N 2 3.75 syn 50.00 6 Solo Lobber 11.3 N 10 5.5 syn 160.00 1 Solo Queensize 10.9 HH 6 5.0 syn 130.00 3 Solo Kingsize 13.1 HH 5 5.6 syn 140.00 3 ; PROC PRINT data=sport.racquets (bysort=yes); var raqname instock; by price; format price dollars.; title 'Solo Brand Racquets by Price Level'; run;
Solo Brand Racquets by Price Level ---------------------------- Price=low --------------------------- OBS RAQNAME INSTOCK 1 Solo Junior 6 -------------------------- Price=medium -------------------------- OBS RAQNAME INSTOCK 3 Solo Queensize 3 4 Solo Kingsize 3 2 Solo Lobber 1
PROC PRINT data=sport.racquets (bysort=no); var raqname instock; by price; format price dollars.; title 'Solo Brand Racquets by Price Level'; run;
Solo Brand Racquets by Price Level ---------------------------- Price=low --------------------------- OBS RAQNAME INSTOCK 1 Solo Junior 6 -------------------------- Price=medium -------------------------- OBS RAQNAME INSTOCK 2 Solo Lobber 1 3 Solo Queensize 3 4 Solo Kingsize 3