I have read in a report using the input statment to create a SAS dataset. Unfortuantely, the original report contains summary after each section resulting in unwanted observations.
I need to delete these additonal unwanted observations and can see that the rows that need deleting are those after a observation in which field#10 ='Summary' until the observation where field#5='End'. (this can be a variable number of records).
I have tried using the following code:
data Output ;
set InputDataset ;
if field#10='Summary then
do until (field#5='end') ;
delete ;
end ;
run ;
This only deletes the records that contain 'Summary' in Field#10 rather than all records between 'Summary' and 'end'.
Any help would be appreciated,
melfb
I need to delete these additonal unwanted observations and can see that the rows that need deleting are those after a observation in which field#10 ='Summary' until the observation where field#5='End'. (this can be a variable number of records).
I have tried using the following code:
data Output ;
set InputDataset ;
if field#10='Summary then
do until (field#5='end') ;
delete ;
end ;
run ;
This only deletes the records that contain 'Summary' in Field#10 rather than all records between 'Summary' and 'end'.
Any help would be appreciated,
melfb