Hi,
I have some data in which I want to conver the value of some variables into new variables.
Here's some data:
[pre] data tmp;
input AMT01 AMT02 AMT03 AMT04 CODE01 $ CODE02 $ CODE03 $ CODE04 $;
datalines;
100 200 500 400 AB CD EF GH
100 200 500 400 AB CD IJ KL
100 200 500 400 AB EF IJ KL
;
run;[/pre]
And here's how the table looks:
[pre] AMT01 AMT02 AMT03 AMT04 CODE01 CODE02 CODE03 CODE04
100 200 500 400 AB CD EF GH
100 200 500 400 AB CD IJ KL
100 200 500 400 AB EF IJ KL[/pre]
Here's how I want that data to look:
[pre] AB CD EF GH IJ KL
100 200 500 400 . .
100 200 . . 500 400
100 . 200 . 500 400[/pre]
Is there some simple method of creating the variable names without using macros? Hopefully with a function?
Thanks.
Message was edited by: John T