I have what I hope is an easy question. I am new to SAS, but I have an extensive IT background.
I have a data file that I want to process in SAS. The general problem is that I only want to process a record if the prior record in the file has a particular value (i,e,. the amt field in the prior record must be negative).
I understand how to subset data based on values in the current record, but since SAS processes record-by-record or observation-by-observation, how do I select a record for processing based on the value of a prior record?
Any thoughts or suggestions would be appreciated.
Thanks,
Gary
I have a data file that I want to process in SAS. The general problem is that I only want to process a record if the prior record in the file has a particular value (i,e,. the amt field in the prior record must be negative).
I understand how to subset data based on values in the current record, but since SAS processes record-by-record or observation-by-observation, how do I select a record for processing based on the value of a prior record?
Any thoughts or suggestions would be appreciated.
Thanks,
Gary