if no errors write output file - if error create empty file - SAS 9.2
Posted on 2013-12-17
I have a file that has four columns I am checking to see if there is an error.
if start_date_error = 'X' or
end_date_error = 'X' or
residual_start_error = 'X' or
residual_end_error = 'X' or
lob_error = 'X' or
media_type_error = 'X' or
dnis = . then ..............................
If one of the above conditions is true for any record on the file, I do not want to write an output file. If none of the records have an error, I would like to write an output file.
Can someone tell me if there is a way to do this?
The challenge is all records from the file need to be tested before the decision can be made to create an output file or an empty file.