09-12-2017 12:54 PM
I would like to ask how to output the warning when data format is incorrect? The warning is to be printed in Out screen or Results Viewer Screen or a popped out window screen, not Log, because there are a lot of information shown in the Log.
My data(AA) looks like this:
ID birth Transfer
01 02/30/1997 .
02 05/23/1992 1992-05-23
I want to show the following information
_ERROR_=1 ; WARNING! INVALID DATE FOR SAS; data=AA, ID=01, birth=02/30/1997
Thanks for your help!
09-12-2017 12:56 PM
Where exactly do you want this output?
In the Results Pane?
That'll be a manual process, whereas the log could be directed to a file instead?
09-13-2017 02:29 PM
How about showing this in Results Viewer Screen?
I don't need the full log but just the error messege.
The warning information should be specific, and need to identify for which SAS dataset, for which record (row), for which variable (column), and the data with wrong date value.
09-13-2017 05:08 PM
The simplest approach - note the records via a flag and then use PROC PRINT to display the results to the log.
However, each check is manual so you will have to code this how you want it to look.
09-13-2017 04:37 PM
09-14-2017 10:41 AM
Thank you all very much.
So you means to save the log then import again and using proc print to print what I want?
That's one approach.
Another is to save the errors in a data set themselves and then print that out.
The first approach only works if a SAS 'error' is the same as your error definition, which I don't think is true.