REXX / z/OS 数据集锁

发布于 2024-09-15 18:22:07 字数 212 浏览 4 评论 0原文

我想知道 REXX 语言的一件事,它如何处理数据集锁。 情况: - 我在 ISPF 编辑器中打开了顺序数据集 - 我启动 REXX 程序来更新(更改)该数据集 - 它工作得很好,但是怎么可能呢?通常,如果您在编辑器中打开了数据集 并且您尝试从另一个程序使用该数据(例如,如果您提交某些作业),您将收到消息“数据集正在使用”。 为什么这可以与 REXX 一起使用。也许相同的地址空间或者...? 谁能告诉我吗?

I'm wondering one thing with REXX-language, how it handles data set locks.
The situation:
- I have sequential data set open in my ISPF-editor
- I start REXX-program what updates (makes changes) that data set
- it works fine, but how it is possible? Normally if you have data set open in your editor
and you try to use that from another program (for example if you submit some job), you'll get message "Data set in use".
Why this works with REXX here. Maybe same address space or...?
Can anyone tell me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

糖果控 2024-09-22 18:22:07

REXX 不管理数据集锁定。 REXX 调用服务模块
分配数据集并对其执行 I/O。输入/输出服务
TSO 下的例程称为 EXECIO。在 EXECIO 可以对数据集进行操作之前,它必须
在 TSO 下分配给某个 DDName。然后在 EXECIO 请求中引用此 DDName。

数据集可以直接从 TSO 命令提示符或从
在你的 REXX exec 里面。数据集锁定级别由 DISPosition 参数确定
在数据集分配期间提供。

在您的特定示例中值得注意的一点是您正在运行 ISPF Edit
会话和 REXX exec 在相同 TSO 会话下。内的数据集分配
同一TSO会话不会互相阻塞。 DISP 参数指定如何锁定
尊重其他流程,而不是流程本身。因此永远不会有
是同一 TSO 会话下运行的不同程序之间的数据集锁定问题。

ISPF 编辑器弹出的“数据集正在使用”消息是
编辑器本身检查先前的分配
在同一 TSO 会话下。

尝试以下实验:

重复您所描述的内容:在数据集上打开 ISPF 编辑会话。然后
在同一 TSO 会话下运行 REXX 过程来更新它。应该毫无怨言地工作。

接下来:请朋友在数据集上打开 ISPF 编辑会话。这次你的 REXX 进程将
由于“数据集正在使用”而爆炸。你自己也可以做同样的事情
通过在 TSO 中编辑数据集并在您的帐户下将 REXX exec 作为批处理作业提交。
交互式 TSO 会话是一个进程,批处理 TSO 会话是第二个进程,
它们之间将发生数据集锁定(您的批处理作业将崩溃或挂起,直到 TSO 编辑会话被放弃)。

仅当不同进程尝试访问数据集时才会出现数据集访问冲突
使用不兼容的 DISP 参数分配相同的数据集。

REXX does not manage dataset locking. REXX calls upon service modules to
allocate datasets and perform I/O on them. The I/O service
routine under TSO is called EXECIO. Before EXECIO can operate on a dataset it must
be allocated under TSO to some DDName. This DDName is then referenced in the EXECIO request.

Datasets may be allocated directly from the TSO command prompt or from
inside your REXX exec. Dataset locking level is determined by the DISPosition parameter
supplied during dataset allocation.

The significant point to pick up on in your particular example is that you are running an ISPF Edit
session and the REXX exec under the same TSO session. Dataset allocations within
the same TSO session do not block each other. The DISP parameter specifies how to lock with
respect to other processes, not the process itself. Consequently there will never
be a dataset locking issue between different programs running under the same TSO session.

The 'Dataset in use' message poped up by the ISPF editor is a function of the
editor itself checking for prior allocations
under the same TSO session.

Try the following experiment:

Repeat what you described: Open an ISPF Edit session on a dataset. Then
run your REXX proc under the same TSO session to update it. Should work without complaint.

Next: Ask a friend to open an ISPF Edit session on the dataset. This time your REXX proc will
blow up because of "dataset in use". You can do the same thing yourself
by editing the dataset in TSO and submitting the REXX exec as a batch job under your account.
The interactive TSO session is one process, the batch TSO session is a second process and
dataset locking will occur between them (your batch job will either blow up or will hang until the TSO Edit session is abandoned).

Dataset access conflicts only show up when different processes attempt to
allocate the same dataset with incompatible DISP parameters.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文