I need a help. We use Control-m as the scheduler. Control-m expects all the dataset used by the job to be allocated to the job before the job starts its execution. Once all the dataset are allocated then the job is said to execute. After the completion of each step the datasets allocated to the particular steps are released (in detail, JOB1 has three steps. the //STEP1 uses datasets AAA.dataset1 and AAA.dataset2 and //STEP2 uses datasets AAA.dataset3 and AAA.dataset4. //STEP3 uses dataset AAA.dataset1 and AAA.dataset2 that is used by //STEP1. Control-m expects the four dataset to be allocated to the job. Once the //STEP1 is completed datasets AAA.dataset1 and AAA.dataset2 are set free. //STEP2 is completed datasets AAA.dataset3 and AAA.dataset4 are set free. For the execution of //STEP3 it expects dataset AAA.dataset1 and AAA.dataset2 to be re-allocated. After allocation of the datasets the //STEP3 starts its execution. Once execution is completed the datasets are set free)
Next, the JOB2 uses the datasets used by the JOB1 (AAA.dataset1 and AAA.dataset2)
Then JOB2 starts its execution only after the datasets used by the JOB1 are set free.
For the execution of JOB1 all the four datasets
AAA.dataset1 and AAA.dataset2
AAA.dataset3 and AAA.dataset4 are allocated. Now JOB1 starts its execution. By this time JOB2 has been kicked. JOB2 will be waiting for the dataset AAA.dataset1 and AAA.dataset2. After the completion of //STEP1 of JOB1 the datasets AAA.dataset1 and AAA.dataset2 are set freed and JOB2 starts its execution (let us say JOB2 is quite long running).
Now //STEP3 of JOB1 will be waiting for the datasets AAA.dataset1 and AAA.dataset2 because it is hold by JOB2 and results in contention.
What I need?
The datasets AAA.dataset1 and AAA.dataset2 allocated to the JOB1 should be retained to JOB1 until it gets completed. The dataset may be TAPE, PS or VSAM. We need not worry about TAPE dataset because we use RETAIN in VOLUME parameter.
My question is how to retain PS or VSAM dataset until the end of the job if is used in subsequent steps.