In reply to Samantha.

Yes, Samantha, you can conditionally generate WARNING as well as ERROR messages. However, if you don't want to terminate your job in case of a WARNING (exit code = 1), your script part should be

if [ $exitcode -gt 1 ]
then exit
fi

Also see How to conditionally stop SAS code execution and gracefully terminate SAS session which you might find helpful.