I have a number of files I merged to have a single final dataset.
While doing this, sas ordered the variables as follows: n_myvar1_NUM, n_myvar10_NUM, n_myvar11_NUM, ….. I tried to order the dataset with retain function to get the following corrected order: n_myvar1_NUM, n_myvar2_NUM, n_myvar3_NUM etc, but without success.
What is the best way to order variables 1, 2, 3, instead of 1, 10, 11, etc?
Overall variables span from 1 to 100, so I have: n_myvar1_NUM, …, n_myvar100_NUM.
Thank you in advance