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.