Help using Base SAS procedures

Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

Reply
Occasional Contributor
Posts: 17

Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

aameHi ,

I have a requirement where I need to access DB2 in AIX, whereas SAS code is in mainframe environment, Please anyone can guide me what need to  be done to establish connection and get data .

Document reference or solution to the problem would be helpful.

Regards,

Nitin Dwivedi

Super Contributor
Posts: 358

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

Hi:

You didn't say whether SAS was available on the AIX system.  Also - do you have SAS/Connect and SAS/Access to DB2 on the

AIX system as well?

We go the other way around and access DB2 on the z/OS system and use all these components.

Occasional Contributor
Posts: 17

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

Hi,

No, SAS is not available on the AIX system, It is on Z/OS.  I have SAS/Access to DB2 in Z/OS system as i have referenced DB2 tables in Z/OS, not sure about SAS/connect.

Super Contributor
Posts: 358

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

I think that without SAS products on the AIX, you can't "establish connection and get data".

I second the "call tech support" reply.

Super User
Posts: 7,100

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

I know from experience with a different setup (SAS on AIX, DB/2 on Linux) that SAS makes use of a local DB/2 client installation (SAS can't simply connect to a DB/2 server all by itself). You need to make sure first that the client instance on the SAS machine can connect to the DB in question, then you can set up the conncetion in SAS.

You positively need SAS tech support and your DB administrator to help. It is not trivial.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 17

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS


Thanks ,

I will try to reach Mainframe DBA and ask tech support, will get back with relevant findings.

Super User
Posts: 7,100

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

I strongly recommmend to get in contact with SAS tech support. You situation looks very exotic.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Valued Guide
Posts: 3,208

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

If you have no SAS on AIX then it is no SAS question when you want to use DS2 on AIX.

You should ask your DS2 administration for help.

Do you want to use AIX with SAS connected to DB2 on the mainframe the best approach is the one using SAS connect.

You will need a SAS platform administrator for the integration of all technical components an having them aligned to your business policies.

---->-- ja karman --<-----
Occasional Contributor
Posts: 17

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

Hi Jaap,

Yes, getting in touch with my Mainframe DBA to establish connection with DB2 table defined in AIX and create view/alias in Z/OS.

Is it a feasable approach of creating views in Z/OS and I may access the view using SAS in Z/OS environment.

Respected Advisor
Posts: 4,016

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

What you need is a connection from your Mainframe SAS to your AIX DB2.

SAS/ACCESS to DB2 will allow you to connect to a DB2 client on your Mainframe. This DB2 client then must be able to connect to the DB2 database under AIX.

That this DB2 client is available and can connect is something your Mainframe admin has to work out with your DB2 admin. And once this is working your SAS admin comes into play to define the necessary connection within SMC to the DB2 client. Only then you as the SAS developer can start using this stuff.

As both "Mainframe" and DB2 under AIX are IBM products I would assume that connectivity as such is technically possible - if it's possible within your organisation is of course another question.

Try to figure out if someone else accesses the DB2 from the Mainframe (whether with SAS or otherwise) as this would indicate that all the necessary bits and pieces are already in place and it's only about connecting SAS to the DB2 client.

Well: That's at least how I believe things are working - but may be I'm oversimplifying things here. It's not really my area and I'm always very happy that someone else is working out such stuff for me...

Occasional Contributor
Posts: 17

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

Hi ,

DBA has set up the connection and I was able to retreive SQL extract from AIX database thru batch, DBA has generated a new plan to access the view defined in Z/OS.

Now I am getting issue while accessing it thru online module. SAS has default PLAN attached, therefore giving SQL -805, Can I change the plan for this view only in Online program, as  I have lot many other tables called from the same online program.

Please let me know how it could be established.code will helpful

Valued Guide
Posts: 3,208

Re: Connection to DB2 in AIX, whereas my sas program in Mainframe/ZOS

SAS/ACCESS(R) 9.3 for Relational Databases: Reference, Second Edition    db2plan?
This document is almost DBA work but as it SAS documentation often avoided by the DBA. The SAS platform admin role.

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 11 replies
  • 526 views
  • 0 likes
  • 5 in conversation