I have the data as following: lastsell with some zero values. I just want to replace all zero value with last available data. Eg. From 0 to 40 and 0 to 37.5
please note that i have already input the data into sas file.
security_symbol dtstart dtend lastsell
AA 03JAN07:10:00:00 03JAN07:11:00:00 40
AA 03JAN07:11:00:00 03JAN07:12:00:00 0
AA 03JAN07:14:30:00 03JAN07:15:30:00 0
AA 03JAN07:15:30:00 03JAN07:16:30:00 40
AA 04JAN07:10:00:00 04JAN07:11:00:00 37.5
AA 04JAN07:11:00:00 04JAN07:12:00:00 0
AA 04JAN07:14:30:00 04JAN07:15:30:00 0
AA 04JAN07:15:30:00 04JAN07:16:30:00 0
I want to use retain and lag function to do the coding, but just cannot make it.
Please give me a favor to suggest me the coding. Your help is always appreciated. Thank you very much.