Disp parameter

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Disp parameter

Postby Robert Sample » Sat May 29, 2010 6:13 pm

rajasekhar4u, please go back and read the JCL Language Reference manual again. You have completely and totally misunderstood the disposition parameter. From the manual section
Indicates that the data set is to be passed for use by a subsequent step in the same job.

With SMS, the system replaces PASS with KEEP for permanent VSAM and non-VSAM data sets. When you refer to the data set later in the job, the system obtains data set information from the catalog.


1. A data set can be passed only within a job.
What you posted completely contradicts note 1 of the quote -- and given a choice of believing the manual or your post, I'm going with the manual. A temporary data set will be deleted at the end of a job. A permanent data set will be kept and / or cataloged at the end of a job (unless the disposition is DELETE in which case it is deleted at the end of the job).
Robert Sample
Global moderator
Posts: 3098
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 176 times

Re: Re: Disp parameter


Re: Disp parameter

Postby manasi » Wed Jun 09, 2010 12:15 pm


I think as per your DISP parameter if the job runs successfully then the dataset is passed to the next step within that job only.
It will not be available when job ends.
If job abends then dataset will be catalouged. Correct me if I am wrong.

Manasi 8-)
Posts: 3
Joined: Fri May 21, 2010 10:44 am
Has thanked: 0 time
Been thanked: 0 time

Re: Disp parameter

Postby steve-myers » Wed Jun 09, 2010 5:07 pm

Mansai - In JCL, when you specify DISP=(...,PASS) in JCL, the data set is sort of cataloged for the duration of the job, it is not "passed" to another job.

If you want to make a data set available to another job, you must catalog the data set with DISP=(...,CATLG).

When you "pass" a data set in JCL, it's location is stored in what is sometimes called the "passed data set queue." In a subsequent step, when the data set is retrieved from the "passed data set queue" the data set is removed from the passed data set queue, though you can pass it again. This JCL will not work --
//STEP1   EXEC PGM=---
//ADS      DD  DISP=(NEW,PASS),DSN=&&TEMP1,...
//STEP2   EXEC PGM=---
//STEP3   EXEC PGM=---

STEP3 will fail because &&TEMP1 was removed from the "passed data set queue" (and it was also deleted) in STEP2. This JCL will also fail in STEP2.
//STEP1   EXEC PGM=---
//ADS      DD  DISP=(NEW,PASS),DSN=&&TEMP1,...
//STEP2   EXEC PGM=---
DD statement ADS2 will fail because &&TEMP1 was removed from the "passed data set queue" in DD statement ADS1.

My little examples used temporary data sets, which only exist within a single job, but the same rules apply for "permanent" data sets.
Global moderator
Posts: 1772
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 168 times

Re: Disp parameter

Postby dick scherrer » Mon Sep 06, 2010 2:17 pm

Hello and welcome to the forum,

In(PASS) normal termination of of the job ps/pds is passed to the next Job
As posted, this is completely incorrect. . .

As was mentioned earlier - terminology is critical.

PASS will make the dataset available for subsequent steps with in a job. When the job terminates, temporary PASSed datasets are deleted and cannot be used in a "next job".
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times


Return to JCL


  • Related topics
    Last post