As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

A Better Way to Flip (Transpose) a SAS Dataset

From sasCommunity
Jump to: navigation, search


Many SAS programmers have flipped out when confronted with having to flip (transpose) a SAS dataset, especially if they had to transpose multiple variables, needed transposed variables to be in a specific order, had a mixture of character and numeric variables to transpose, or if they needed to retain a number of non-transposed variables. Wouldn't it be nice to have a way to accomplish such tasks that was easier to understand and modify than PROC TRANSPOSE, was less system resource intensive than PROC TRANSPOSE, required fewer steps, could accomplish the task as much as fifty times or more faster than PROC TRANSPOSE and, unlike PROC TRANSPOSE, created transposed variables that inherit the original variable types, formats, lengths and labels?

Online Materials

Click here to view the paper

Click here to download the SAS code described in this paper

Powerpoint Presentation

The presentation is shown in the box, below, but the behavior is different for different browsers. With Chrome, the pdf menu will appear if you move your pointer to the lower part of the box. Click on the menu's far left item, then you can PgDn through the presentation. Also, with Chrome's menu, one of the icons will let you save the file so that you can open it, directly, using the free Adobe Reader. With Explorer the menu appears if you move your pointer toward the upper part of the box, but is only needed if you want to save the pdf. With Firefox, clicking the >> symbol at the upper-righthand corner of the box lets you save the file.


SAS Global Forum 2013
MWSUG 2013

Revision History

Created: January 20, 2013
Most Recent Version: September 15, 2017

Contact Info User:art297