I regularly see people ask how to access data on UNIX or Windows from apps on IBM's z/OS (mainframe) operating system. However, I haven't been able to find anything that discusses the options. Therefore, I'm using this post to provide the basics about one solution - using IBM's InfoSphere Federation Server as an interface.
This solution is for people running DB2 on z/OS. It's probably best discussed with a simple example and a picture. So, my example is - let's say you want to issue SQL to Oracle on UNIX from an app on z/OS. Here's a high-level picture of how it works:
The first things you need to do are to set up Federation Server and have it point to the Oracle database. More specifically:
If you've never worked with a federated database, you can try it out very quickly by getting a copy of DB2 Express-C (the free DB2) and following the Fast Start for data federation here on ChannelDB2. DB2 Express-C does not provide access to Oracle tables. However, once you've been through the Fast Start's configuration for DB2 tables, you don't need to know much more to work with Oracle tables. When you're ready, the DB2 LUW 9.7 Information Center has plenty of information about federated access to Oracle under the folder called, surprisingly enough, 'Federation' :)
On the z/OS side, you'll need to add entries to the DB2 z/OS communication database. These point to the federated database. Your z/OS app will use this information (the 'location') to connect to federated database through DB2's DDF. This use of DDF is possible with Federation Server because DB2 z/OS can be a client to Federation Server just as it can be a client to DB2 for Linux, UNIX, and Windows.
A Few Variations
The example shows only one Oracle database being accessed. However, many database can be accessed through a single Federation Server. Many types of databases can be accessed as well - Teradata, Netezza, Microsoft SQL Server, and more. You can even take advantage this data virtualization to join tables from different databases.
Federation Server does not have to run on the same system as your Oracle or other databases. The following picture shows a variation of our example with Oracle running on a different system from the one where Federation Server runs:
The one exception to this is if you want to access Microsoft Excel. You'll need a Federation Server running on the Windows where your Excel files are.
Using a DB2 LUW and InfoSphere Warehouse
All DB2 LUW and InfoSphere Warehouse editions come bundled with a subset of Federation Server function. The subset depends on the edition. For example, DB2 Advanced Enterprise Server Edition and InfoSphere Warehouse Enterprise Edition come bundled with Federation Server's Oracle, DB2, and Informix access at no additional cost. More importantly, all other DB2 LUW and InfoSphere Warehouse editions can be extended using an install of Federation Server.
Feel free to ask questions. I'll update this post if I think of any points I missed.