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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.