Hi All,
I am using options EERORABEND to stop the sas processing when error occurs, but this option is not able to stop the job and creates empty output files despite of errors.
Is there is a way to restrict the job from not creating the outputfiles if there are any errors.
Thanks,
Soujanya.
Hi,
Have you tried looking into the syscc documentation, which "Contains the current condition code that SAS returns to your operating environment (the operating environment condition code)."
You can make the production of the files conditional upon syscc being equal to 0 (zero).
If this does not suit your needs then please say why not, and edit your question to give more context on how your code is structured, etc.
Kind regards,
Amir.
Are you sure that the "files" were not left over from a previous successful run of the code? If you do not delete data sets prior to running then they may exist. Procedures may reuse previous data.
Also any output created prior to the encountering the error would exist ( and is often helpful in diagnosing what eventually created the error). Are you expecting such output to be deleted when the whole program Abends?
ERRORABEND will react to most, but not all ERRORs, therefore not everything that you view as an error.
So please show the piece of code that creates the ERROR after which you want to stop processing. Ideally, post the log from an actual "problem run".
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.