You asked why he does it. If you force the SAS not to define it the way it wants, using the other methods mentioned here, you may run into sorting problems when one variable is defined as a string and the other is numerical. Example:
VAR3 = VAR1 || VAR2; VAR4 = VAR1 || PUT(VAR2,2.); VAR1 VAR2 VAR3 VAR4 DOG 1 DOG 1 DOG1 DOG 2 DOG 2 DOG2 ... ... ... ... DOG 11 DOG11 DOG11
If you sort by VAR3 , you get what you probably want .... If you sort by VAR4 , you get DOG1 , DOG11 , DOG2 ...
Just my observation. Hope this helps.
source share