Uncataloged image copy dataset

John Alexander

Uncataloged image copy dataset
Hi DB2 Colleagues,

Does anyone know why DB2 allows reusing a cartridge image copy dataset
that has DISP=(NEW,KEEP) more than once, without having to run a MODIFY
? ...this is definitely a good Bug to have in DB2!..

Normally you'll get messages DSNU407I & DSNU408I when reusing a
previously cataloged (even if it does not exist) cart image copy
dataset, however we have been running Adhoc DBA online reorgs with the
following copy dataset more than once, and the job works fine !

//COPYA1 DD DSN= DB2? .WORK. dbname . tsname .COPY. Dyymmdd,
// DISP=(NEW,KEEP),
// DCB=BLKSIZE=28672,UNIT=CART,
// LABEL=(1,SL,RETPD=1),VOL=(,RETAIN,,99)

I had a look in the Admin & Utility guides, but there is nothing
mentioned in relation to why DB2 allows this .

Ps. We are an SMS shop, with zOS V1.7 & DB2 V7


Regards
John



***********************************************************
CAUTION: This email and files included in its transmission
are solely intended for the use of the addressee(s) and may
contain information that is confidential and privileged.
If you receive this email in error, please advise us
immediately and delete it without copying the contents
contained within. Woolworths Limited (including its group
of companies) do not accept liability for the views
expressed within or the consequences of any computer
viruses that may be transmitted with this email. The
contents are also subject to copyright. No part of it
should be reproduced, adapted or transmitted without the
written consent of the copyright owner.
***********************************************************

The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L 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, 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

Gerard LE ROY

Re: Uncataloged image copy dataset
(in response to John Alexander)
Hi Alexander,

That’s not possible.

Have a look on SYSIBM.SYSCOPY.

There is DSNUCX01 a UNIQUE INDEX on SYSIBM.SYSCOPY(DSNAME).



Regards

Gerard






The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L list
archives, the FAQ, and delivery preferences are at
< http://www.idug.org/lsidug > www.idug.org under the Listserv tab. While at
the site, you can also access the IDUG Online Learning Center, Tech Library
and Code Place, see the latest < http://www.idug.org/lsconf > IDUG conference
information, and much more.
If you have not yet signed up for Basic Membership in IDUG, available at no
cost, click on < http://www.idug.org/lsms > Member Services

The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L 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, 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

Carol Broyles

Re: Uncataloged image copy dataset
(in response to Gerard LE ROY)
Actually it is possible. If your DISP=(NEW,CATLG), then you can't catalog more than one. If your DISP=(NEW,KEEP), then DB2 records the VOLSER and UNIT in SYSCOPY. As long as you don't have the same dataset name on the same VOLSER, DB2 allows it.

Carol

Gerard News <[login to unmask email]> wrote:
Hi Alexander,
That’s not possible.
Have a look on SYSIBM.SYSCOPY.
There is DSNUCX01 a UNIQUE INDEX on SYSIBM.SYSCOPY(DSNAME).

Regards
Gerard




The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L list archives, the FAQ, and delivery preferences are at www.idug.org under 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
The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L list archives, the FAQ, and delivery preferences are at www.idug.org under 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


---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.

The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L 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, 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

Mark McCormack

Uncataloged image copy dataset
(in response to Carol Broyles)
Let me expand on Carol's reply.

If you create a cataloged copy file, then DB2 posts to sysibm.syscopy
only the dsname, and the volume column in the sysibm.syscopy row is left
blank. If you create a copy file that is not cataloged, then DB2 posts
both the dsname and volume number(s) in the sysibm.syscopy row. It is
the combination of dsname and volume - as posted in the sysibm.syscopy
row - that must be unique.

If you run the recover utility, DB2 decides which copy file to use (or
files, if incremental copies are involved). DB2 must decide whether or
not to try to allocate the copy file through the OS catalog or not. If
the volume info in the sysibm.syscopy row is blank, then it is assumed
that the file is cataloged, and DB2 will try to allocate it that way.
If the file exists but is no longer cataloged (rolled off a GDG, for
example), then DB2 will not be able to find it. If volume number(s) are
posted in the sysibm.syscopy row, then DB2 will try to allocate it by
those volume number(s) without using the OS catalog.

So there is method in the madness. It's just not obvious.

Mark McCormack


The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L 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, 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

John Alexander

Re: Uncataloged image copy dataset
(in response to Mark McCormack)
Really appreciated the great feed back, Thankyou.



We have been using DISP=(,KEEP) cart image copies for a while now,
which I could not figure out, but occasionally I would still get an
'Image Exists' error, which Mark's explanation has cleared up, also our
small scratch pool exasperated the problem.



Best wishes for 2008.





Regards

John



-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of McCormack, Mark A
Sent: Saturday, 29 December 2007 1:49 AM
To: [login to unmask email]
Subject: [DB2-L] Uncataloged image copy dataset



Let me expand on Carol's reply.

If you create a cataloged copy file, then DB2 posts to sysibm.syscopy
only the dsname, and the volume column in the sysibm.syscopy row is left
blank. If you create a copy file that is not cataloged, then DB2 posts
both the dsname and volume number(s) in the sysibm.syscopy row. It is
the combination of dsname and volume - as posted in the sysibm.syscopy
row - that must be unique.

If you run the recover utility, DB2 decides which copy file to use (or
files, if incremental copies are involved). DB2 must decide whether or
not to try to allocate the copy file through the OS catalog or not. If
the volume info in the sysibm.syscopy row is blank, then it is assumed
that the file is cataloged, and DB2 will try to allocate it that way.
If the file exists but is no longer cataloged (rolled off a GDG, for
example), then DB2 will not be able to find it. If volume number(s) are
posted in the sysibm.syscopy row, then DB2 will try to allocate it by
those volume number(s) without using the OS catalog.

So there is method in the madness. It's just not obvious.

Mark McCormack


The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L
list archives, the FAQ, and delivery preferences are at www.idug.org
< http://www.idug.org/lsidug > under 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
< http://www.idug.org/lsconf > , and much more.
If you have not yet signed up for Basic Membership in IDUG, available at
no cost, click on Member Services < http://www.idug.org/lsms >

***********************************************************
CAUTION: This email and files included in its transmission
are solely intended for the use of the addressee(s) and may
contain information that is confidential and privileged.
If you receive this email in error, please advise us
immediately and delete it without copying the contents
contained within. Woolworths Limited (including its group
of companies) do not accept liability for the views
expressed within or the consequences of any computer
viruses that may be transmitted with this email. The
contents are also subject to copyright. No part of it
should be reproduced, adapted or transmitted without the
written consent of the copyright owner.
***********************************************************

The IDUG DB2-L Listserv is only part of your membership in IDUG. DB2-L 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, 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