Hi all,
Is there any SAS option I could change so that a unique index constraint violation leads to an Error instead of a Warning?
data target(index=(name /unique)) Change;
set sashelp.class;
output target;
if _n_=5 then name='Neo' ;
output Change;
run;
proc append base=target data=change;
run;
In an ideal world SAS would roll-back the insert - but I can understand that I'm not dealing with a database and why that's not possible and it's also not a real issue for my actual use case.
....but I'd really love if SAS would throw an Error and stop further processing instead of me having to check explicitly for a Warning and then issue an abort.
Given that no one answered assumed that I didn't miss something and there isn't a SAS option/configuration that would allow me to instruct SAS to throw an error instead of a warning.
Going to mark my own answer as solution in order to close this track.
Given that no one answered assumed that I didn't miss something and there isn't a SAS option/configuration that would allow me to instruct SAS to throw an error instead of a warning.
Going to mark my own answer as solution in order to close this track.
I browsed The Complete Guide to SAS Indexes by Michael A. Raithel and did not find such an option either.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.