I agree that learning all of the language elements, in's and out's of macro programming isn't for beginners, but using an already written macro is a totally different thing. Surprise yourself! Try these two steps: 1. copy (highlight then ctrl-c) the code at http://www.sascommunity.org/mwiki/images/b/be/BB-07-2013.sas 2. paste (ctrl-v) the code in whatever window you would normally write your own code 3. run the code 4. then run the following: data have;
input pronum hor_nr horiz $ humus $;
cards;
203 1 Cv h4
203 2 Cv h2
205 1 Cv h0
205 2 Ah h3
205 3 Yro h0
;
%transpose(data=have, out=want, by=pronum, id=hor_nr, var=hor_nr horiz humus)
... View more