02-04-2013 04:37 PM
I find it a tad awkward and it isn't consistent but within viewtable you can click on the column heading once the left click and hold to drag the column. However this doesn't, at least in my install of SAS 9.2.3 and Windows 7, allow dragging a column past the current displayed boundaries of the window (i.e. can't keep going left or right). Also the order is ONLY for the current view. It does not actually change the order of the columns in the dataset. When you close the view and reopen the previous column you have to got through the process again if you want to look at columns.
02-04-2013 04:42 PM
thanks, yes, I have noticed it too. it will not stay even I have click the save botton.
I just exported it to excel and rearrange the column and then imported back to the sas datasets.
Hope in the future we are able to do it directly from viewtable window.
02-04-2013 04:57 PM
Typically if I need to arrange columns, I'll recreate the dataset (assuming its not too large) using proc sql and then arrange the variables the order I want them.
proc sql feedback;
select * from want;
Check the log after running that and it will include all your variables and then you can order them a little bit more easily (IMO).
02-05-2013 05:17 AM
You could also use proc contents or proc sql to get the variable names:
proc contents data=have out=want ; run;
proc sql; describe table have; quit; Check the log for the variable names.