Hi,
Currently in one of the sas job, I'm getting a Sas warning and that throws an error in my SAS DI job. But I got the desired output even after my job gets aborted/warnings. So I don't want to do any code changes because of this warnings. Planned to suppress the wanings at job level using the return code.
Is there any possible way to have a small part of sas code at the end of the sas job to check the return code ( i.e. warning rc) and then change the return code to mark the job as successful?
Thanks in advance.
It would be better to fix the part generating the warning. Can you post the log, so that we can actually see the warning?
Its a DB2 warning not a SAS warning
NOTE: The macro GENERATESQL completed compilation without errors.
23 instructions 2688 bytes.
NOTE: The macro APPENDSQL completed compilation without errors.
13 instructions 1296 bytes.
WARNING: During execute: [IBM][CLI Driver][DB2/LINUXX8664] SQL0437W Performance of this complex query might be sub-optimal.
Reason code: "1". SQLSTATE=01602
I believe that error is being passed to SAS from IBM/DB2
https://www.ibm.com/support/pages/sql0437w-performance-complex-query-may-be-sub-optimal
I also recommend that you fix the warning and not try to "hide" it.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.