Hi ,
I have a sas code using pass through and runs the SQL statement in DB2 directly. But the query is inefficient because of multiple joins and throws an DB2 warning. Even from the SAS client , I'm getting the same warning message , but the end results are fine.
I want to suppress the warning message in SAS that comes out pass through. Is there any way to suppress and I tried multiple method, but ended up in failure.
Please let me know the solution if available. Thanks in advance.
Did you try the NOWARN option for proc sql?
Did you try improving the query?
In my opinion SAS does the right thing to capture and surface the Warning DB2 throws.
As this is DB2 explict pass-through code I'd suggest you investigate how to capture the Warning on the DB2 side. In Oracle you'd be using PL/SQL for this. Don't know how that's done with DB2.
As soon as you use explicit passthrough, you switch to a foreign language, and need to use that language's tools. Rephrase your DB/2 code in such a way that it does not throw a WARNING. Or use a proper DB/2 option for this.
Bottom line: study the DB/2 documentation. Maxim 1 is valid in all environments.
Thanks All...I tried with the suggestion , but not able to suppress warning.. So tuned the DB2 query to not to throw any warning.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.