LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 21 Oct 2010 13:22:36 -0400
Reply-To:   Michael Raithel <michaelraithel@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael Raithel <michaelraithel@WESTAT.COM>
Subject:   Re: Reading DB2 tables with SAS
In-Reply-To:   <037AB3FF38D44C4BAFB5DFF3D06B57BAA2A6F403@EX-CMS01.westat.com>
Content-Type:   text/plain; charset="us-ascii"

Dear SAS-L-ers,

Last week, I posted the following reply to Amrita's DB2 question:

> Dear SAS-L-ers, > > Amrita posted, in part, the following: > > > .......... Now we want to try and use pass-thru to connect to the > > db2 tables but no one seems to know the SSID, user name or password. > The > > person responsible is no longer with the company so we are trying to > > see how we can get this information. > > > > <<Amrita's entire original posting can be found beneath the Sig line>> > > Amrita, I would suggest finding out where that person ended up and then > sending him a very nice Hallmark card with note explaining the > situation and including a crisp, new $20 bill in it. I would bet that > would do the trick! > > But, seriously though; your friendly DB2 DBA should be able to provide > that information to you. Of course, s/he would be even friendlier if > you provided that nice Hallmark card with said contents along with your > query:-) > > Amrita, best of luck in all your SAS endeavors! > Look! Up in the sky!" "It's a birdie!" "It's a plane!" "It's Super SAS Institute lurker!" (http://en.wikipedia.org/wiki/Adventures_of_Superman_(TV_series)#Opening_sequence )

Okay, so maybe it wasn't Superman, but a very clever birdie who sent me the following for both Amrita's and your consideration on this topic:

1.If you have libname assignment then you have Implicit PROC SQL support for accessing DB2 using the SAS/ACCESS engine. The following syntax with appropriate values would work:

proc sql; select * from x.my_db_tab where ...;

Some debugging options to consider to see what SQL is generated from the Implicit PROC SQL query and passed to the DBMS would be -

options sastrace=',,d,d';

To turn the tracing option off you would -

options sastrace=',,,,';

2.Once you have found your SSID you should be able to libname to DB2 on the mainframe with something like:

libname x db2 ssid=xxx;

Note your connection credentials do not require a user/password since your logon id is used as authentication to the DB2 server.

I would expect that the libname statement is part of a pre-assigned library when SAS is started. Your SAS admin should be able to get you the SSID connection info. Once you have the connection info then PROC SQL explicit passthu would be open to you.

Well, birdies may not be able to "Faster than a speeding bullet! More powerful than a locomotive! Able to leap tall buildings in a single bound!", but they do monitor the 'L and their input is always welcomed!

All, best of luck in all your SAS endeavors!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote the book on performance" E-mail: MichaelRaithel@westat.com

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Author: The Complete Guide to SAS Indexes http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page