SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 4885: The TRANSPOSE procedure creates variable names that begin with numbers

DetailsAboutRate It

When using the TRANSPOSE procedure prior to SAS® 8, if an ID variable's value starts with a number, the output data set variable names begin with an underscore (_).

The VALIDVARNAME=ANY system option now allows the creation of variables that start with numbers. These are called name literals. When referencing these variables, the following syntax is employed: 'xxxx'n (where xxxx is a number like 5001). If the system option is set to VALIDVARNAME=ANY and PROC TRANSPOSE encounters an ID variable whose value starts with a number, the resulting variable name will not be preceded with the underscore character.

If you want the variables that are created by the TRANSPOSE procedure to conform to the rules that were in place prior to SAS 8, set the option to either VALIDVARNAME=V7 or VALIDVARNAME=V6 before the TRANSPOSE procedure step, or add PREFIX=_ to your PROC TRANSPOSE statement. Using VALIDVARNAME=V7 will allow variable names up to 32 characters long, but it will still require that all variable names begin with an alphabetic or an underscore character. Using VALIDVARNAME=V6 will add the additional requirement that variable names be no longer than 8 characters.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASSolaris8 TSD1
OpenVMS VAX8 TSD1
64-bit Enabled Solaris8 TSD1
IRIX8 TSD1
HP-UX8 TSD1
ABI+ for Intel Architecture8 TSD1
z/OS8 TSD1
CMS8 TSD1
64-bit Enabled AIX8 TSD1
64-bit Enabled HP-UX8 TSD1
OpenVMS Alpha8 TSD1
Tru64 UNIX8 TSD1
AIX8 TSD1
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.