improved diagnostics for the data stmt