BookmarkSubscribeRSS Feed
helannivas88
Obsidian | Level 7

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. 

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

Did you try the NOWARN option for proc sql?

Did you try improving the query?

Patrick
Opal | Level 21

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.

Kurt_Bremser
Super User

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.

helannivas88
Obsidian | Level 7

Thanks All...I tried with the suggestion , but not able to suppress warning.. So tuned the DB2 query to not to throw any warning.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 610 views
  • 0 likes
  • 4 in conversation