When you define a view descriptor, you can also include a SORT clause to specify
data order. You can reference only
the CA-Datacom/DB fields selected for the view descriptor.
Without a SORT clause or a SAS BY statement, the data order is determined by the
Native Key for the
CA-Datacom/DB table (or by the Default Key specified in the access or view descriptor).
A SAS BY statement automatically
issues a SORT clause to CA-Datacom/DB.
However, the SAS BY statement might cause grouping of the output results
in some procedures; this might not be what you want.
If a view descriptor already contains a SORT clause, the BY statement overrides the
SORT clause for that
program. An exception is when the SAS procedure includes the NOTSORTED option. Then,
the SAS BY statement is ignored, and the view descriptor SORT clause is used.