Search code examples
c#sql.netdb2mainframe

C# - connecting to DB2 z/os mainframe without a license


Problem: I have a c# application that requires read and write access to DB2 z/os on mainframe.

I've searched around for weeks and came up with the conclusion: either go with IBM drivers (which requires a license file, or DB2 connect, or some sort of licensed software) or go with ole DB provider for db2 (host integration server) by Microsoft.

Microsoft option is free, just need to install the drivers, no need a license file. IBM option requires a DB2 connect software and a license (even if you use the ibm nuget package, it requires you to have the license file)

Questions: 1) can I do this for free meaning no license purchase? Aside from the Microsoft option? 2) is it possible to deploy the project to a machine without having to install any drivers? (Kinda like ibm's self contained nuget package) but you know, not requiring a license file?

Thanks in advance! P.S. the DB2 server is remote, not local


Solution

  • As cschneid suggested, it IS possible to connect a c# application (or any a .NET application) to DB2 (Version 11 and up) for z/OS on mainframe through REST services. You just end up requesting and getting responses via JSON objects. You just need to make sure that DB2 is configured to handle REST calls (especially if you're using HTTPS)