![]() | ![]() | ![]() | ![]() |
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.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | Solaris | 8 TSD1 | |
OpenVMS VAX | 8 TSD1 | |||
64-bit Enabled Solaris | 8 TSD1 | |||
IRIX | 8 TSD1 | |||
HP-UX | 8 TSD1 | |||
ABI+ for Intel Architecture | 8 TSD1 | |||
z/OS | 8 TSD1 | |||
CMS | 8 TSD1 | |||
64-bit Enabled AIX | 8 TSD1 | |||
64-bit Enabled HP-UX | 8 TSD1 | |||
OpenVMS Alpha | 8 TSD1 | |||
Tru64 UNIX | 8 TSD1 | |||
AIX | 8 TSD1 |