DBD和PSB加载模块在IMS中是可执行程序还是控制块?

huangapple go评论57阅读模式
英文:

Are the DBD and PSB load modules in IMS executable programs or just control blocks?

问题

当一个数据库管理员(DBA)定义一个新的 IMS 数据库时,他们会遵循一个两步的 DBD 生成过程:

  1. 汇编一系列 DBDGEN 控制语句(实质上是汇编宏)成一个目标模块。
  2. 将目标模块与 IMS 库链接,生成一个可加载模块。

同样,对于 PSBsDBA 使用 PSBGEN 实用程序,也会生成一个可加载模块。

这些可加载模块是 IMS 执行的实际程序,还是 IMS 代码引用的控制块,或者两者都有?

我想象中 IMS 动态加载一个 PSB,然后跳转到它,PSB 中的代码设置了指向 PCBs 的指针,并加载和调用了在 PSBGEN 时指定的应用程序。我猜我试图理解的是 IMS 和应用程序之间的控制流程,以及 DBDPSB 在控制流程中扮演的角色。

英文:

When a DBA defines a new IMS database, they follow a two step DBD generation process where they

  1. assemble a list of DBDGEN control statements, which are nothing but assembler macros, into an object module
  2. link the object module with IMS libraries to produce a load module. Similarly, for PSBs, the DBA uses the PSBGEN utility, which also results in a load module.

Are these load modules actual programs that IMS then executes or are they just control blocks that IMS code references or both?

I imagine that IMS loads a PSB dynamically, and then branches to it, and the code in the PSB sets up pointers to PCBs and loads and calls the application program that was specified at PSBGEN time. I guess what I'm trying to understand is the flow of control between IMS and the application program and the role that the DBD and PSB play in the control flow.

答案1

得分: 2

DBDs 和 PSBs 都用于定义数据结构。PSB 中的 PCBs 定义了应用程序与数据库、终端、消息队列等之间的接口。这就是为什么,如果你在 PCB 中不指定数据库段,即使在 DBD 中存在,你的应用程序也不会“知道”它们存在。

我喜欢用指定文件路径来形容它,如果不告诉我的程序在哪里查找数据,它就不知道要去哪里查找,而 PCB 就提供了这个功能。在 PSBGEN 过程中,你不需要指定的一个 PCB 是 IOPCB。如果你有一个在线应用程序想要从消息队列中读取数据,那么在发出 GU (Get Unique) DL/I 调用时,你将指定 IOPCB 来获取那条消息。IOPCB 就是指向消息数据的“指针”,同时也包含有关谁发送了消息、什么时间、序列号等其他信息。然后,你可以在另一个 DL/I 调用中使用相同的 IOPCB,在其中将消息插入,例如发送原始消息的用户。

所以,总结一下,PSB 是 PCBs 的集合。如果你使用 DBPCB(应用程序视图的数据库),你需要一个 DBD(实际的数据库描述)。PCBs 用于定义你的程序需要使用 DL/I 调用进行通信的数据结构,你需要告诉你的程序外部数据区域的外观。

提示: 如果你在运行 PSB/DBDGEN 工具时没有使用 PRINT NOGEN,你将获得生成的汇编程序列表。如果你查看 PSBGEN 的列表,你会看到一堆 DC (Define Constant) 语句,这实际上是汇编方式定义常量的方式。

编辑:以下是一个链接,你可以在其中查阅 PSB/DBD/ACBGEN 工具的参考文档。

https://publibz.boulder.ibm.com/epubs/pdf/dfsursg3.pdf

英文:

The short and easy answer: They are control blocks.

DBDs and PSBs are both used to define data structures. Your PCBs in the PSB defines an interface between your application and your database, terminal, message queue etc. This is why, if you don't specify database segments in the PCB your application will not "know" about them even if they are present in the DBD.

I like to think of it in terms of pointing out a path for a file, my program won't know where to look for the data unless I tell it where to look and that is the function a PCB provides. One PCB you don't need to specify during PSBGEN is the IOPCB. If you have an online application that wants to read from the message queue, you will specify the IOPCB when issuing your GU (Get Unique) DL/I calls to get that message. The IOPCB is then the "pointer" to where you go for message data and will also contain other information as to who sent the message, what time, sequence number etc. You could then use the same IOPCB in an another DL/I call where you ISRT (Insert) a message back to for example the original message sender.

So my summary, a PSB is a collection of PCBs. If you use a DBPCB (Application view of database) you need a DBD (Actual description of the database). PCBs is used define data structures that your program needs to communicate using DL/I calls, you need to tell your program how the data areas outside look.

Tip: If you run the PSB/DBDGEN utilities without PRINT NOGEN you will get an assembler listing of what what was generated. If you look at that listing for a PSBGEN you will see a bunch of DC (Define Constant) statements which is essentially the Assembler way of defining constants.

EDIT:
Here is a link to the Utilities reference where you can read up on the PSB/DBD/ACBGEN utilities.

https://publibz.boulder.ibm.com/epubs/pdf/dfsursg3.pdf

huangapple
  • 本文由 发表于 2023年6月29日 22:40:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76582129.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定