A BY statement can be used in the SEVERITY procedure to process the input data set in groups of observations defined by the BY variables.
If you specify the BY statement, then PROC SEVERITY expects the input data set to be sorted in the order of the BY variables unless you specify the NOTSORTED option.