The best way of achieving this is have a macro variable which is a list of data set variables (i.e. SortOrder=var1 var2 var3).
If you want to be a bit more dynamic then you probably need to utilise the metadata available about data sets (using PROC CONTENTS or the SASHELP data views) to find out what variables exist on data sets.
Another point to add to Lawrence's answer is that if a macro variable has no value, when substitution is done, you could consider it to be the same as adding a blank or hit on the space bar to your code.
The first time this Proc Sort is invoked, there is no value for var3 (%let var3= so the data is only sorted by region and subsidiary. For the second Proc Sort, all 3 macro variables have a value, so the data is sorted by all 3 variables.