I am not sure if this is your problem but there is a documented
of JCL that will lose the tape volume for stacking when the
step spans multiple volumes. The subsequent volume is lost. We
this in a similar job to yours with the refer backs across steps.
read of APAR Pk33563 and JCL VOL parm in JCL reference guide.
"If the current job step extends the referenced data set to more
the new volume information is NOT available to the referencing
statement when the one of the following conditions is true: 1) The
set that is referenced (directly or through a chain of
existed before the start of the step containing the reference.
Basically if your first step last DD spanned multiple volumes then
first DD of the next step referencing the previous step DD will not
the volume name and hence the job will failed with S613. This
happens when the first step spans volumes. The workaround - start a
volume on the second step.
I hope this helps.
McCormack, Mark A wrote:
> I had expected to see a problem in your JCL with the
> VOL=(,RETAIN,REF=*.stepname.ddname) specification. I have
> problems when all other dd stmts referred back to the first.
> has each dd stmt referring back to the immediately preceding
> which is correct. I always used UNIT=AFF=ddname (ddname = copy
> 1,SL) on all copy file dd stmts other than the first, but I
> think that would lead to your problem. I used it to cause the
> use the same tape drive for all copies. I used RETAIN to
> unnecessary rewind/remount.
> Many sites have a default upper limit of 5 tapes per file
> cause a failure if an attempt were made to overflow to a 6th
> That upper limit can be overridden with another parameter on
> stmt. But you say that your failure occurs on overflow to the
> tape, so I am still puzzled.
> Others have suggested using LISTDEF and TEMPLATE utility
> stmts, and that is what I would do. It allows you to eliminate
> output file dd stmts from the DSNUTILB step, making it
> juggle all the complicated parameters for unit, vol, label,
> like. The DB2 utility controller will dynamically allocate
> you. You indicate that you don’t normally work with DB2,
> change may be a sizable step for you. Are you trying to back
> tablespaces in the DB2 catalog and directory? You have a
> copy utility steps in the JCL you posted. If you post all of
> sysin stmts from all steps, I would be willing to write
> equivalent LISTDEF and TEMPLATE stmts for you.
> The IDUG DB2-L Listserv is only part of your membership in
> list archives, the FAQ, and delivery preferences are at _
> < http://www.idug.org/lsidug
under the Listserv tab. While at the
> site, you can also access the IDUG Online Learning Center,
> Library and Code Place, see the latest _ IDUG conference
> <%20 http://www.idug.org/lsconf
and much more.
> If you have not yet signed up for Basic Membership in IDUG,
> at no cost, click on _ Member Services <%20 http://www.idug.org/lsms
The IDUG DB2-L Listserv is only part of your membership in IDUG.
DB2-L list archives, the FAQ, and delivery preferences are at
the Listserv tab. While at the site, you can also access the IDUG
Online Learning Center, Tech Library and Code Place, see the latest
IDUG conference information, and much more. If you have not yet
signed up for Basic Membership in IDUG, available at no cost, click
on Member Services at http://www.idug.org/lsms