Page 2 of 2

Re: Disp parameter

PostPosted: Sat May 29, 2010 6:13 pm
by Robert Sample
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 12.19.2.2:
PASS
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.

Notes:

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).

Re: Disp parameter

PostPosted: Wed Jun 09, 2010 12:15 pm
by manasi
Hi,

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.

Regards,
Manasi 8-)

Re: Disp parameter

PostPosted: Wed Jun 09, 2010 5:07 pm
by steve-myers
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=---
//ADS      DD  DISP=OLD,DSN=&&TEMP1
//STEP3   EXEC PGM=---
//ADS      DD  DISP=OLD,DSN=&&TEMP1

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=---
//ADS1     DD  DISP=OLD,DSN=&&TEMP1
//ADS2     DD  DISP=OLD,DSN=&&TEMP1
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.

Re: Disp parameter

PostPosted: Mon Sep 06, 2010 2:17 pm
by dick scherrer
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".