Records in a CA-Datacom/DB table are maintained in order by values in the specified
Native Key. In a
SAS/ACCESS view descriptor, you can provide a different Default Key for the
view, and the records then assume the order of your specified Default Key. You can also
specify a
SORT clause, which consists of the keyword SORT followed by one or more
field names, separated by commas. You can specify ascending or descending order for each
sort
key; the default is ascending order. Here is an example:
sort state, city, lastname desc
In addition, you can specify data order in a SAS program using a SAS BY clause. Note,
however, that a SAS BY clause overrides a SORT clause stored in a view descriptor
unless the SAS procedure includes the NOTSORTED option. In this situation, the SAS
BY clause is ignored, and the SORT clause in the view descriptor is used.