Dear all,
Thank you for your replies. Because I did not put my question very clearly, your answers could not completely solve my problem. I'm really sorry to make it worse in my previous reply. My sample data is as follows:
data sample;
length transactions $ 1000;
input firmid date transactions $
datalines4;
1001 1/27/2017 price=20.2,volume=1200;price=21,volume=1555;price=23,volume=1187;price=21,volume=1496
1002 1/28/2017 price=20.9,volume=1300;price=20.9,volume=1000;price=21,volume=2018
1003 1/29/2017 price=21.9,volume=2200;price=22.5,volume=1700
......;
run;
The number of transactions everyday is not the same, and the position of each transaction price and volume is not regular. I want to substring the first transction price to variable price1, volume to variable volume1. And the second and other transctions to variable price2 and varible volume2 and so on.
Thanks a lot
... View more