BookmarkSubscribeRSS Feed
helannivas88
Obsidian | Level 7

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.

 

 

3 REPLIES 3
andreas_lds
Jade | Level 19

It would be better to fix the part generating the warning. Can you post the log, so that we can actually see the warning?

helannivas88
Obsidian | Level 7

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

AMSAS
SAS Super FREQ

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.

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1076 views
  • 0 likes
  • 3 in conversation