Name range lists u/i SAS 8 have the form: FirstVar -- LastVar, and so says
the SAS 8 online doc.
The SAS 9 online doc says the form is: FirstVar - LastVar (one dash), while
the (downloadable) SAS manual (base_lrconcept_8943.pdf) says it is:
FirstVar --- LastVar (three dashes).
I would say one dash can not be valid as that indicates a numbered range
list, which may yield a different list than a named range list with same
first and last variables. So I did some experiment with SAS 9.1.3:
DATA Test; X1=1; X3=3; X5=5; X4=4; X2=2; RUN;
TITLE 'one dash'; PROC PRINT DATA=Test; VAR X1 - X5; RUN;
TITLE 'two dashes'; PROC PRINT DATA=Test; VAR X1 -- X5; RUN;
TITLE 'three dashes'; PROC PRINT DATA=Test; VAR X1 --- X5; RUN;
It luckyly appears that it still works as before: one dash implies a
numbered range list, two dashes imply a named range list and three dashes
are illegal and cause a SAS syntax error.
That means that the SAS 9 documentation is wrong in both cases.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant