Discussion:
JCL ERROR Anybody ?
(too old to reply)
Beverly Caldwell
2018-06-11 23:34:31 UTC
Permalink
This is the second time this has happened to me in as many months:

A job in the DB2 install process:

Job has 12 steps, the, first 11 are HLASM steps compilingl the various bits
and pieces needed by DB2. Step 1 defines a temporary pds with
DISP=(NEW,PASS) gives it some DCB info even a DSORG=PO. Name is
&&TPDS(member name) . Steps 2 - 11 output the compiled code into this
temporary pds. using &&TPDS(member name) DISP=OLD,PASS. OK so far. Step 12
allocates the entire pds to a ddname to service link edit INCLUDE
statements.and immediately after that in the JCL alllocates &&TPDS(member)
to use as SYSIN to the linkage editor. This allocation fails with a dataset
not found.jcl error All dispositions except the first and even includig the
last (failing) one are OLD, PASS.

Anybody have any idea what's going on here ? I'm hoping someone will pop up
with a "Oh you can't do that" and tell me why. Either that or it's some
ancient quirk of JCL.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Sri h Kolusu
2018-06-11 23:50:05 UTC
Permalink
OK so far. Step 12 > allocates the entire pds to a ddname to service link
edit INCLUDE statements.and immediately after that in the JCL alllocates
&&TPDS(member)
to use as SYSIN to the linkage editor. This allocation fails with a
dataset not found.jcl error All dispositions except the first and even
includig the
last (failing) one are OLD, PASS.
Beverly,

If you are referring the same temp dataset with 2 different DDnames in the
same step, then you probably need VOL=REF

something like this

//STEP0100 EXEC PGM=SORT
//SORTOUT DD DSN=&&IN,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
...
//STEP0200 EXEC PGM=ABCD
//INA DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
//INB DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT


Kolusu





----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Beverly Caldwell
2018-06-11 23:57:10 UTC
Permalink
I see. Never even considered that. This came from IBM via the DB2 order. Of
course that doesn't mean they actually tested it!
Post by Sri h Kolusu
OK so far. Step 12 > allocates the entire pds to a ddname to service link
edit INCLUDE statements.and immediately after that in the JCL alllocates
&&TPDS(member)
to use as SYSIN to the linkage editor. This allocation fails with a
dataset not found.jcl error All dispositions except the first and even
includig the
last (failing) one are OLD, PASS.
Beverly,
If you are referring the same temp dataset with 2 different DDnames in the
same step, then you probably need VOL=REF
something like this
//STEP0100 EXEC PGM=SORT
//SORTOUT DD DSN=&&IN,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
...
//STEP0200 EXEC PGM=ABCD
//INA DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
//INB DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
Kolusu
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-06-12 00:31:01 UTC
Permalink
Post by Sri h Kolusu
OK so far. Step 12 > allocates the entire pds to a ddname to service link
edit INCLUDE statements.and immediately after that in the JCL alllocates
&&TPDS(member)
to use as SYSIN to the linkage editor. This allocation fails with a
dataset not found.jcl error All dispositions except the first and even
includig the
last (failing) one are OLD, PASS.
Beverly,
If you are referring the same temp dataset with 2 different DDnames in the
same step, then you probably need VOL=REF
something like this
//STEP0100 EXEC PGM=SORT
//SORTOUT DD DSN=&&IN,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
...
//STEP0200 EXEC PGM=ABCD
//INA DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
//INB DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
//STEP0200 EXEC PGM=IEWL
//SYSLIB DD DSN=&&IN,DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
//SYSLIN DD DSN=&&IN(member),DISP=(OLD,PASS),VOL=REF=*.STEP0100.SORTOUT
On Mon, 11 Jun 2018 16:34:22 -0700, Beverly Caldwell wrote:
...
Post by Sri h Kolusu
Anybody have any idea what's going on here ? I'm hoping someone will pop up
with a "Oh you can't do that" and tell me why. Either that or it's some
ancient quirk of JCL.
"ancient quirk" pretty much covers it. Besides giving experts an opportunity
to show-off to novices. I think it's bad design with no good reason. If the
objective is to scratch the temp DS immediately after the last step that
refers to it, there are cleverer ways to do that. Should be RFE fodder
regardless of the simple but not universally known circumvention.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Tom Marchant
2018-06-12 11:35:43 UTC
Permalink
Post by Beverly Caldwell
I see. Never even considered that. This came from IBM via the DB2 order. Of
course that doesn't mean they actually tested it!
When a passed data set is referenced, it is removed from the passed data queue.
That's why it can't find it for the second DD statement. When the step ends, the
PASS disposition puts it back in the passed data queue, so that a later step can
reference it. See "Passing a Data Set" in the JCL User's Guide (not the Reference).
Post by Beverly Caldwell
Post by Sri h Kolusu
If you are referring the same temp dataset with 2 different DDnames in the
same step, then you probably need VOL=REF
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-06-12 15:20:58 UTC
Permalink
Post by Tom Marchant
Post by Beverly Caldwell
I see. Never even considered that. This came from IBM via the DB2 order. Of
course that doesn't mean they actually tested it!
If this is not the result of any customization you may have performed, an SR
against the DB2 packaging is in order.
Post by Tom Marchant
When a passed data set is referenced, it is removed from the passed data queue.
That's why it can't find it for the second DD statement. When the step ends, the
PASS disposition puts it back in the passed data queue, so that a later step can
reference it.
That design is moronic! It should be fixed. How much resource has been
wasted explaining it to novices (even by RTFM). Why not simply leave the
entry in the queue until the end of the step, or never remove it if PASS is
specified? We'd be better off if we had never need to know this stuff.
Post by Tom Marchant
... See "Passing a Data Set" in the JCL User's Guide (not the Reference).
If the behavior is not specified in the the Reference an RCF is in order. The
Guide properly answers the question, "How can I do this?" The Reference
should answer, "What happens when I do it?"
Post by Tom Marchant
Post by Beverly Caldwell
Post by Sri h Kolusu
If you are referring the same temp dataset with 2 different DDnames in the
same step, then you probably need VOL=REF
Notes:
o VOL=REF is not needued on the first referback within a step, only on the
second and subsequent.
o VOL=REF may mention a DDNAME either in an earlier step or in the same
step. I regularly do this in a step which allocates a NEW data set (non-SMS)
so I can refer to it by two different DDNAMEs within that step.
o My mentor explained (I haven't tried) that once a temp data set is
used twice in a step and both PASSed, it may be referenced an equal
number of times in a subsequent step with no need for VOL=REF. I suppose
such a DD might be added in the creating step to eliminate the need for some
code in later steps.

The behavior is inexcusable; it ought to be fixed. Simpler Is Better.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...