首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JCL独占访问数据集错误

JCL独占访问数据集错误
EN

Stack Overflow用户
提问于 2011-07-05 02:28:06
回答 1查看 2K关注 0票数 0

根据MVS JCL参考指南,在作业开始之前,它请求对数据集的独占控制:

代码语言:javascript
复制
DISP and ENQ: Before starting the first step of a job, the initiator requests
control of all of the data sets in that job by issuing an ENQ for each of them,
using the value specified for DISP to determine the kind of ENQ issued. The
initiator issues the ENQ for each data set at the highest level required for that
data set by any step of the job. For example, if all steps of the job request
shared control of a specific data set (DISP=SHR) then the ENQ for that data set
is requested as SHR. If, on the other hand, any step of the job requests
exclusive control of a specific data set (DISP=NEW, DISP=MOD, or DISP=OLD), then
the ENQ for that data set is requested EXCL.

但我得到了两种不同的行为:

a)我通过ISPF DATASET_A打开并提交一个使用与DISP=相同的数据集的JCL (新建、编目、删除)。我收到一条TSO消息,因为作业请求数据集,而JCL在我通过ISPF释放数据集之前不会启动。

b)我提交了两个JCL,这两个JCL与DISP=(新建、目录、删除)使用相同的数据集,但两者同时开始。

为什么作业在并行运行时不请求对数据集的独占访问?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-05 22:03:42

b)中的作业不像您期望的那样工作的原因是您同时启动它们。它们都创建了一个同名的新数据集,这是允许的。当作业完成时,首先完成的作业应该编目数据集,第二个作业将得到NOTCAT2错误,因为它已经编目。

disp语句的第二部分(Catalog)是成功步骤的结果,第三部分(Delete)是不成功步骤的结果。

创建新的数据集并获得独占访问权限

MOD表示以下其中一项:

代码语言:javascript
复制
    * The data set exists and records are to be added to the end of it. The data set must be sequential.

    * A new data set is to be created.

In either case, MOD specifies exclusive (unshared) use of the data set. 

摘自IBM Manual

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6574943

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档