OUTPUT file1:new_id, file2:old_id, file3:zip_code3 IF file1:city_code1 DOES NOT MATCH ANY file3:city_code3 OR ( file1:city_code1 MATCHES ONE file3:city_code3 AND THIS file3:state_code3 DOES NOT MATCH ANY file2.state_code2 )