我们如何在大型机上开发无需DB2 / z的DB2 / LUW应用程序? [英] How do we develop an application on the mainframe to access DB2/LUW without DB2/z?

查看:172
本文介绍了我们如何在大型机上开发无需DB2 / z的DB2 / LUW应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开发了一个在大型机(z / OS)上运行的应用程序,它使用CAF(Call Attach Facility)与DB2 / z进行通信,用于存储其数据。

We have developed an application which runs on the mainframe (z/OS), and it uses CAF, the Call Attach Facility, to talk to DB2/z for storing its data.

那些已经拥有DB2 / z(因此不必为此而付出代价)的客户并不关心,但还有其他一些想要使用我们的应用程序而不使用 em也承担了数据库的费用。

Those customers which already have DB2/z (and hence have to pay for it regardless) are not concerned, but there are others who want to use our application without incurring the expense of the database as well.

由于费用,他们表示希望让我们的产品不使用DB2 / z。在z / OS下,DB2的许可证费用相当高,我们的应用程序并不真正需要提供的精确的可靠性水平。

They have expressed a desire to have our product not use DB2/z, due to the expense. Under z/OS, the licence fees for DB2 are rather high and our application doesn't really need the insane levels of reliability that it provides.

那么他们会像我们这样做的是在与主机完全分离的机器上的zLinux(SLES / RHEL)或DB2 / LUW下运行DB2。或者甚至,尽管在非IBM数据库中可能会更困难。

So what they'd like us to do is to run DB2 under either zLinux (SLES/RHEL), or DB2/LUW on a machine totally separate from the mainframe. Or even, though this will probably be harder, in a non-IBM database.

我们正在寻找一个希望最小化的解决方案来实现这一点。 。 DB2具有所有联合的东西,这将允许使用DB2 / z的程序在其他地方运行的实例上无缝访问数据,但这仍然需要DB2 / z,因此不会导致成本降低。

We're looking for a hopefully-minimal-change solution to our code in achieving this. DB2 has all its federated stuff which will allow a program using DB2/z to seamlessly access data on an instance running elsewhere, but this still requires DB2/z and hence won't result in a cost reduction.

将所有数据从大型机转移到最简单的方法,并允许我们从我们的应用程序中完全删除DB2 / z依赖关系?

What would be the easiest way to shift all the data off the mainframe and allow us to remove the DB2/z dependency completely from our application?

推荐答案

建立在@ NealB的答案上,创建层的另一种方式是在应用层中不要有SQL,而是调用子程序来完成I / O。您表示您愿意创建自定义构建,因此您可以为常用的持久层创建一组例程。

Building on @NealB's answer, another way to create the layers would be to have no SQL in your application layer, but to call subroutines to accomplish your I/O. You indicate you would be willing to create custom builds, so you could create a set of routines for commonly-asked-for persistence layers.

调用数据库连接模块,对于z / OS上的DB2将执行CAF调用,对于z / Linux上的DB2,(将建立与DBMS的SSL连接)。在内存中保持一个结构,指向必要的数据结构的指针,以与您选择的DBMS进行通信。

Call the "database connect" module, which for DB2 on z/OS would do the CAF calls, for DB2 on z/Linux would (say) establish an SSL connection to the DBMS. Maintain a structure in memory with a union of pointers to the necessary data structures to communicate with your DBMS of choice.

FWIW我已经看到了这样做的供应商代码,允许业务逻辑独立于DBMS实现。一些商店使用VSAM,其他DB2,其他IMS。数据模型是凌乱的,但有时候他们是休息。

FWIW I've seen vendor code that does this, allowing the business logic to be independent of the DBMS implementation. Some shops use VSAM, others DB2, other IMS. The data model is messy, but, sometimes them's the breaks.

这篇关于我们如何在大型机上开发无需DB2 / z的DB2 / LUW应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆