0

ジョブ開始前のMVSJCLリファレンス・ガイドによると、データ・セットの排他的制御を要求します。

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.

しかし、私は2つの異なる動作をしました:

a)ISPF DATASET_Aを介して開き、DISP =(NEW、CATALOG、DELETE)で同じデータ・セットを使用するJCLを送信します。データ・セットがジョブによって要求され、ISPFを介してデータ・セットを解放するまでJCLが開始されないため、TSOメッセージが表示されます。

b)DISP =(NEW、CATALOG、DELETE)で同じデータセットを使用する2つのJCLを送信しますが、両方が同時に開始します。

並行して実行しているときに、ジョブがデータセットへの排他的アクセスを要求しないのはなぜですか?

4

1 に答える 1

3

b)のジョブが期待どおりに動作しない理由は、それらを同時に開始するためです。どちらも同じ名前の新しいデータセットを作成しますが、これは許可されています。ジョブが終了すると、最初に終了した方がデータセットをカタログ化する必要があり、2番目のジョブはすでにカタログ化されているためNOTCAT2エラーが発生します。

dispステートメントの2番目の部分(カタログ)は、成功したステップで発生することであり、3番目の部分(削除)は、失敗したステップで発生することです。

新しいデータセットを作成して排他的アクセスを取得するには、

MOD次のいずれかを示します。

    * 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マニュアルから引用

于 2011-07-05T14:03:41.710 に答える