Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dataset already used in Image copy

413 views
Skip to first unread message

Kiran Gunnam

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

Hi!,
Every week we take image copy for development databases. There are
around 152 tablespaces in one of the database. It was working fine till
now. But for the past week we tryied to run that job for almost 4-5 times.
Evry time it says
DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY .
(This message we'r getting it for 134th tablesapce.) And it terminates the
utility.
We use GDG's for Image copy. We use modify recovery to delete those image
copies which are
older than 65 days I don't see any datasets with that name. Is that even we
used modify recovery to
delete datasets It won't really delete it.
It says this dataset has been used by a IC
on 97/02/07. Please advise me what to do.
Thanks in advance.
Kiran

McCawley, Mike

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

Kiran -

You probably had an allocation failure when trying to create the next
GDG generation. Unfortunately, DB2 recorded the explicit name of the
GDG dataset in SYSCOPY before the dataset was successfully cataloged.
Now the GDG directory says the next dataset should be generation N, but
DB2 says the dataset has already been used. Look in SYSCOPY to see
where the conflict lies and use a IEBGENER to allocate a dummy (+1) GDG
dataset (or datasets) to get you past the entry DB2 says is in use.

Other ways to get caught in this trap are to delete the most current few
GDG generations and try to go on, or to recover an ICF catalog with an
older version of the GDG Base directory (missing the latest entries).

This could easily be fixed if the DB2 Modify Recovery would allow
deletion of SYSCOPY entries from the most current end of the stack
instead of only from the oldest end to the present.

Worst case, do a Modify Recovery delete age(*). This kills ALL entries
for the tablespace. Quickly do a Full Image Copy (I prefer Shrlevel
Reference when there are no other Image Copies useful for recovery),
maybe two for good measure, and go on with life. Your tablespace WILL
be at risk of media failure during the interim between the Modify and
the successful Image Copy (no backups are available in Log Range of the
object for recovery), so you may wish to do other backups also, like an
unload.

Some third party recovery products will allow you override things and
recover in spite of the SYSCOPY entries, but it is all on your shoulders
at that point.

Hope this helps,

Michael L. McCawley
Database Administrator
UtiliCorp United, Inc.
Kansas City, MO

> ----------
> From: Kiran Gunnam[SMTP:kiran....@prudential.com]
> Sent: Friday, August 15, 1997 2:30 PM
> To: DB...@AMERICAN.EDU
> Subject: Dataset already used in Image copy

Clay, Kent

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

We had the same problem for a while. The expiration date on the GDG was
less than the number of days specified in the MODIFY causing the MVS
datasets to go bye-bye. When the utility built the next generation,
based on the generations left after the MVS uncatalog, it had a number
that was still present in SYSCOPY. Once the GDG expiration dates were
extended, everything was hunky-dory.

As a little helper-toy, I have a home-grown utility that reads SYSCOPY,
calls an assembler routine that checks MVS to see if the dataset still
exists, and displays all occurrences in SYSCOPY that do not have a
matching MVS dataset. I can whip that sucker out to you if you so
desire.

Kent Clay (KC...@Express.Style.com)

> ----------
> From: Kiran Gunnam[SMTP:kiran....@prudential.com]

> Sent: Friday, August 15, 1997 3:30 PM

Mark Ediger

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

Hi Kiran,

You probably had a previous job abend and your job scheduler (or
somebody else) uncataloged the GDG version of the dataset for that
tablespace. You could do a lot of work and query the sysibm.syscopy
table to find out the highest GDG number and then catalog the
appropriate GDG file names until the next one is a higher number than in
SYSCOPY OR! your could do what I always do and just put +2 or +3 in the
dd name in the JCL until it works.

Good luck.

Williams Rojas

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

The problem is when the image copy fail by some reason and it intent
create a new GDG and the image copy is already done wit h de same
name.

You must to skip the next GDG or several GDG of the file and it will
work fine.


Regards.
WRojas.
if...@email.maraven.pdv.com


__________________________ Separador de respuesta ______________________________
Asunto: Dataset already used in Image copy
Autor: DB2 Data Base Discussion List <DB...@AMERICAN.EDU> en internet
Fecha: 15/8/97 3:30 PM

Edith Morales

unread,
Aug 15, 1997, 3:00:00 AM8/15/97
to

Select the DSNAME column in SYSIBM.SYSCOPY to see if it exist,
after executing the MODIFY utility.
Maybe that DSNAME was created for a different DATABASE,
TABLESPACE, and has not been "modified".

Doty, Susan (DBA)

unread,
Aug 18, 1997, 3:00:00 AM8/18/97
to

I'm glad someone brought this up because I've been wondering if there
has been a change recently in the Copy utility.
We used to have the 'Dataset already used' problem all the time until we
started coding the DD's DISP field as (NEW,CATLG,CATLG). This catalogs
the image copy dataset in MVS even if the step fails for some reason.
We did this because DB2 was cataloguing the GDG even if the step abended
and we needed DB2 to agree with MVS.
However, we had a situation recently where operations reran an image
copy 10 or 11 times due to a B37 and SYSCOPY shows an ICTYPE of T and an
incomplete Dsname (no GDG) for each of the failed jobs. Does this mean
that DB2 is no longer fully cataloguing failed image copies and we can
change all our JCL back to (NEW, CATLG, DELETE)? I've looked in the
version 4 manuals and nothing clearly says that this was changed.
Anyone know for sure?
----------
From: Hubbs, Dan
To: DB...@AMERICAN.EDU
Subject: Re: Dataset already used in Image copy
Date: Friday, August 15, 1997 4:45PM

Kiran:

As luck would have it...last night I had the same problem. I ran a
quick job to delete the SYSCOPY entries for the GDG that was created and
then reran the I/C.

//DELCOPY1 JOB AC00310000,'DAN',REGION=3072K,

// CLASS=A,MSGCLASS=F

//* ***************************************************************** */

//* MODIFY ALL TABLESPACES RECOVERY INFORMATION

//* REMOVES OLD IMAGE COPY DATASETS

//* ***************************************************************** */

//STEP015 EXEC DSNUPROC
//AFPDEF01 OUTPUT FORMDEF=BFDF01,PAGEDEF=BPDF01

//SYSPRINT DD SYSOUT=F

//SYSUDUMP DD SYSOUT=F

//SYSIN DD *

MODIFY RECOVERY

TABLESPACE DATABASE.TABLESPACE

DELETE AGE(*)

If you change your I/C DISP to (NEW,CATLG,CATLG) the catalog will match
syscopy when it abends and you wont need to do this.

Hope this helps.

Dan
dhu...@bandag.com

>----------
>From: Kiran Gunnam[SMTP:kiran....@prudential.com]

>Sent: Friday, August 15, 1997 2:30 PM
>To: DB...@AMERICAN.EDU
>Subject: Dataset already used in Image copy

Mike Levine

unread,
Aug 18, 1997, 3:00:00 AM8/18/97
to

Hi Kiran,

We also had a similar problem backing up our multitude of non-production
tablespaces. We had an additional problem of having to keep track and make=
=20
JCL changes whenever tablespaces were added or deleted. So, to address=
these
problems I developed a procedure which utilizes QMF queries and procs and
a simple edit macro which dynamically generates image copy JCL based on what
tablespaces are in a database at the time. The generated IC datasets=
contain=20
a date node with a retention of 15 days. We have been running this
procedure for several years without a single abend! The edit macro follows:

I. PGBKUP1:

PROC 0 DB2SYS() DSN() DBNAME() =20
CONTROL NOMSG =20
ISPEXEC VPUT (DB2SYS,DBNAME) =20
ISPEXEC EDIT DATASET('&DSN') MACRO(PGBKUP2) =20
EXIT CODE(0) =20


II. PGBKUP2:

/********************************************************************* =20
/* EDIT MACRO TO PRODUCE DB2 IMAGE COPY JOB FROM QMFBATCH OUTPUT =20
/* MAINT: =20
/* 2/94 ORIGINAL MIKE LEVINE =20
/*--------------------------------------------------------------------*=20
/* PARMS AND INPUT FORMAT *=20
/* *=20
/* EDIT MACRO EXPECTS INPUT DATASET TO BE IN QMF DSQPRINT *=20
/* FORMAT OR AT MINIMUM THE FOLLOWING: *=20
/* *=20
/* COLS 4-11 DATABASE NAME (RIGHT PADDED WITH BLANKS) *=20
/* COL 12 A PERIOD "." *=20
/* COLS 13-20 TABLESPACE NAME *=20
/* *=20
/********************************************************************* =20
ISREDIT MACRO =20
CONTROL NOMSG =20
ISPEXEC VGET (DB2SYS,DBNAME) =20
SET &ENV =3D &SUBSTR(6:7,&DBNAME) =20
SET &ENV =3D &SUBSTR(6:7,&DBNAME) =
=20
SET &COMMENT =3D &STR(//*) =20
SET &JCL1 =3D + =20
&STR(//PG&ENV.COPY JOB (PYYYYY,PGP$),PASSPORT,CLASS=3DF,REGION=3D6M,) =
=20
SET &JCL2 =3D + =20
&STR(// MSGCLASS=3DP,MSGLEVEL=3D(1,1),NOTIFY=3DXXXXXXX) =
=20
SET &JCL3 =3D + =20
&STR(//COPY&ENV EXEC DSNUPROC,SYSTEM=3D&DB2SYS.,UID=3D'',UTPROC=3D'') =
=20
SET &JCL4 =3D + =20
&STR(//DSNUPROC.SYSIN DD *) =20
SET &JCL5A =3D &STR(//DSNUPROC.DS1 DD DISP=3D(MOD,CATLG,CATLG),) =
=20
SET &JCL6A =3D &STR(// LABEL=3D(1,SL,EXPDT=3D98015),) =
=20
SET &JCL7A =3D &STR(// UNIT=3DCART,VOL=3D(,RETAIN,,20),) =
=20
SET &CURRDATE =3D &SUBSTR(7:8,&SYSDATE)+ =20
&SUBSTR(1:2,&SYSDATE)&SUBSTR(4:5,&SYSDATE) =20
SET &YR =3D &SUBSTR(7:8,&SYSDATE) =20
SET &MO =3D &SUBSTR(1:2,&SYSDATE) =20
SET &DY =3D &SUBSTR(4:5,&SYSDATE) =20
SET &JCL8A =3D &STR(// DSN=3DPGT.PASSPORT.D&CURRDATE..&DBNAME..IMAGE.DS
SET &JCL10 =3D &STR(//STOP&ENV EXEC PGM=3DIKJEFT01 ) =
=20
SET &JCLSTEP =3D &STR(//STEPLIB DD DSN=3DSQP.TEST.DSNLOAD,DISP=3DSHR ) =
=20
SET &JCLSPRT =3D &STR(//SYSTSPRT DD SYSOUT=3D* ) =20
SET &JCLSPRNT =3D &STR(//SYSPRINT DD SYSOUT=3D* ) =20
SET &JCLDUMP =3D &STR(//SYSUDUMP DD SYSOUT=3D* ) =20
SET &JCLSTSIN =3D &STR(//SYSTSIN DD DSN=3DPGT.INPUT(PG&DB2SYS),DISP=3DSHR)
SET &JCL11 =3D &STR(// DD DSN=3DPGT.INPUT(PG&ENV.STOP),DISP=3DSHR)=
=20
SET &JCL12 =3D &STR(// DD DSN=3DPGT.INPUT(PG&ENV.STRO),DISP=3DSHR)=
=20
SET &JCL13 =3D &STR(//START&ENV EXEC PGM=3DIKJEFT01,COND=3DEVEN =
=20
SET &JCL14 =3D &STR(// DD DSN=3DPGT.INPUT(PG&ENV.STRW),DISP=3DSHR)=
=20
SET &JCL15 =3D &STR(// DD DSN=3DPGT.INPUT(PG&ENV.STOP),DISP=3DSHR)=
=20
SET &LCOM =3D &STR(//************************************************+=20
*****************) =20
SET &COM1 =3D &STR(//* STOP AND START THE DATABASE READ/ONLY ) =20
SET &COM2 =3D &STR(//* START THE DATABASE READ/WRITE ) =20
SET &COM3 =3D &STR(//* IMAGE COPY SHARE LEVEL REFERENCE ) =20
SET &COM4 =3D &STR(//$ JCL GENERATED ON: &MO/&DY/&YR ) =20
ISREDIT EXCLUDE ALL 'COL1' =20
ISREDIT EXCLUDE ALL '-------' =20
ISREDIT EXCLUDE ALL '1' 1 =20
ISREDIT EXCLUDE ALL 'DSN' =20
ISREDIT EXCLUDE ALL ' ' 4 =20
ISREDIT EXCLUDE ALL P'=AC' 2 =20
ISREDIT DEL ALL X =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' .' '.' =20
ISREDIT CHANGE ALL ' ' 1 3 ' ' =20
ISREDIT SEEK ALL '.' =20
ISREDIT (TOTAL1) =3D SEEK_COUNTS =20
IF &TOTAL1 =3D 0 THEN GOTO EX1 =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL1) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL2) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (LCOM) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COM4) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COM1) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (LCOM) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL10) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLSTEP) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLSPRT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLSPRNT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLDUMP) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLSTSIN) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL11) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL12) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (LCOM) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COM3) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (LCOM) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL3) =20
ISREDIT LINE_BEFORE .ZCSR =3D (COMMENT) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL5A) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL6A) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL7A) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL8A) =20
SET &AFFN =3D 1 =20
SET &COUNT =3D 0 =20
SET &DSNUM =3D 2 =20
IF &TOTAL1 =3D 1 THEN GOTO SKIP =20
DO UNTIL &COUNT =3D &TOTAL1 - 1 =20
SET &JCL5 =3D &STR(//DSNUPROC.DS&DSNUM DD DISP=3D(MOD,CATLG,CATLG),) =
=20
SET &JCL6 =3D &STR(// LABEL=3D(&DSNUM,SL,EXPDT=3D98015),) =
=20
SET &JCL7 =3D &STR(// UNIT=3DAFF=3DDS&AFFN.,) =
=20
SET &JCL8 =3D + =20
&STR(// DSN=3DPGT.PASSPORT.D&CURRDATE..&DBNAME..IMAGE.DS&DSNUM)=20
SET &JCLA =3D + =20
&STR(// VOL=3D(,RETAIN,,20,REF=3D*.COPY&ENV..DSNUPROC.DS&AFFN.),)=
=20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL5) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL6) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL7) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCLA) =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL8) =20
SET &AFFN =3D &AFFN + 1 =20
SET &DSNUM =3D &DSNUM + 1 =20
SET &COUNT =3D &COUNT + 1 =20
END =20
SKIP: + =20
ISREDIT LINE_BEFORE .ZCSR =3D (JCL4) =20
ISREDIT X ALL '//' =20
ISREDIT X ALL '/*' =20
ISREDIT C ALL ' ' 'COPY TABLESPACE' 6 20 NX =20
ISREDIT C ALL ' ' 'COPYDDN DSNNN ' 40 62 NX =20
SET &COUNT =3D 1 =20
ISREDIT FIND 'DSNNN' FIRST =20
DO UNTIL &COUNT > &TOTAL1 =20
ISREDIT CHANGE 'DSNNN' 'DS&COUNT' =20
SET &COUNT =3D &COUNT + 1 =20
END =20
ISREDIT (LSTLINE) =3D LINENUM .ZLAST =20
ISREDIT LINE_AFTER .ZCSR =3D (JCL14) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCL15) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCLSTSIN) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCLDUMP) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCLSPRNT) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCLSPRT) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCLSTEP) =20
ISREDIT LINE_AFTER .ZCSR =3D (JCL13) =20
ISREDIT LINE_AFTER .ZCSR =3D (LCOM) =20
ISREDIT LINE_AFTER .ZCSR =3D (COMMENT) =20
ISREDIT LINE_AFTER .ZCSR =3D (COM2) =20
ISREDIT LINE_AFTER .ZCSR =3D (COMMENT) =20
ISREDIT LINE_AFTER .ZCSR =3D (LCOM) =20
ISREDIT C ALL '//$' '//*' =20
ISREDIT END =20
EXIT CODE(0) =20
EX1: + =20
ISREDIT X ALL =20
ISREDIT DEL ALL X =20
ISREDIT LOCATE 0 =20
SET &EXITMSG =3D + =20
&STR(NO TABLESPACES WERE FOUND THAT SATISFY THIS QUERY!!!)
ISREDIT LINE_AFTER .ZCSR =3D (EXITMSG) =20
ISREDIT LINE_AFTER .ZCSR =3D (EXITMSG) =20
ISREDIT LINE_BEFORE .ZCSR =3D (EXITMSG) =20
ISREDIT END =20
EXIT CODE(12) =20


III. The JCL that runs the procedure follows:

//PGDCCOPY JOB (TYYYYY,XXXX), =
=20
// CLASS=3D4, =
=20
// MSGCLASS=3DP, =
=20
// MSGLEVEL=3D(1,1), =
=20
// REGION=3D6144K, =
=20
// NOTIFY=3DBE007CH =
=20
//*JOBFROM CZ00MXL =
=20
/*JOBPARM S=3DSYSC =
=20
//*--------------------------------------------------------------------- =
=20
//*--------------- DB2 IMAGE COPY FOR PASSPORT ENVIRONMENT: INDUSDC =
=20
//*--------------- =
=20
//*--------------- NO DP4 - NOT A "PRODUCTION" JOB =
=20
//*--------------- RUNS THROUGH ZEKE WITH CP00DFM ACF AUTHORITY =
=20
//*--------------- IF JOB ABENDS FORCE DONE - NO NOTIFICATION NEEDED =
=20
//*--------------- CONTACT: MIKE LEVINE X2646 =
=20
//*--------------------------------------------------------------------- =
=20
//*--------------------------------------------------------------------- =
=20
//*------------------------------------* DELETE QMF DATASET IF IT =
=20
//*------------------------------------* EXISTS =20
//*---------------------------------------------------------------------=20
//*------ =20
//DELETE EXEC PGM=3DIEFBR14 =
=20
//SYSPRINT DD SYSOUT=3D* =
=20
//QMFDSN DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICSTAGE, =
=20
// DISP=3D(MOD,DELETE,DELETE),SPACE=3D(TRK,1),UNIT=3DSYSDA =
=20
//*---------------------------------------------------------------------=20
//*------------------------------------* ALLOC DATASET FOR RBA =20
//*------------------------------------* QMF FORMAT DATASET DSQPRINT =20
//*---------------------------------------------------------------------=20
//ALLOC EXEC PGM=3DIEFBR14,COND=3D(00,NE) =
=20
//SYSPRINT DD SYSOUT=3D* =
=20
//QMFDSN DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICSTAGE, =
=20
// DISP=3D(,CATLG,DELETE),UNIT=3DSYSDA, =
=20
// DCB=3D(LRECL=3D133,BLKSIZE=3D1330,RECFM=3DFBA),SPACE=3D(TRK,(15,3=
)) =20
//*------ =20
//*---------------------------------------------------------------------=20
//*------------------------------------* RUN QMFBATCH TO LIST OF =20
//*------------------------------------* TABLESPACE AND RUN EDIT MACRO=20
//*---------------------------------------------------------------------
//QMFBATCH EXEC QMFBATCH,COND=3D(00,NE) =20
//SYSPROC DD DSN=3DCZT.MXL.CLIST,DISP=3DSHR =
=20
//DSQPRINT DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICSTAGE,DISP=3DSHR =
=20
//SYSTSIN DD * =20
ISPSTART PGM(DSQQMFE) PARM(S=3DDSN,M=3DB,I=3DIDCZ.PGDCPROC,P=3DQMFPLAN) + =
=20
NEWAPPL(DSQE) =20
ISPSTART CMD(%PGBKUP1 DSN(PGT.PASSPORT.INFR.INDUSDC.ICSTAGE) + =20
DB2SYS(DSN) dbname(INDUSDC) =20
//*---------------------------------------------------------------------
//*------------------------------------* SYNCGENR TO COPY 133 FBA TO =20
//*------------------------------------* 80 FB FOR SUBMIT =20
//*---------------------------------------------------------------------
//COPYJCL EXEC PGM=3DSYNCGENR =20
//SYSPRINT DD SYSOUT=3D* =20
//SYSUT1 DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICSTAGE,DISP=3DSHR =
=20
//SYSUT2 DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICJCL,DISP=3DSHR =
=20
//SYSIN DD DUMMY =20
//*------ =20
//*---------------------------------------------------------------------
//*------------------------------------* SUBMIT IMAGE COPY JOB =20
//*------------------------------------* =20
//*---------------------------------------------------------------------
//SUBMIT EXEC PGM=3DSYNCGENR,COND=3D(00,NE) =
=20
//SYSPRINT DD SYSOUT=3D* =20
//SYSUT1 DD DSN=3DPGT.PASSPORT.INFR.INDUSDC.ICJCL,DISP=3DSHR =
=20
//SYSUT2 DD SYSOUT=3D(A,INTRDR) =20
//SYSIN DD DUMMY =20


IV. One of the qmf procs (PGDCPROC) looks list this:

SET PROFILE (CONFIRM=3DNO =20
RUN IDCZ.PGIC(&&DB=3D'WINDUSSH' =20
PRINT REPORT (WIDTH =3D 133, PRINTER =3D ' '=20

There needs to be one proc from each non-production database,


V. The generic query that is called from the procs looks like this:

SELECT X.DBNAME ||'.'|| X.TSNAME =20
FROM SYSIBM.SYSTABLEPART X WHERE CHECKFLAG =3D' '=20
AND X.DBNAME=3D&DB AND TSNAME LIKE'TIS%' =20

(modify as requried).


These are the pieces. The static jcl runs, executes a qmf proc with creates
a list of tabespaces (DSQPRINT). The static jcl then executes the editmacro
on the list of tablepspaces which generates the image copy jcl which is
then submitted onto the internal reader. Simple!

Good Luck.

Mike Levine
Premier Data Services, Inc.=20

Clay, Kent

unread,
Aug 18, 1997, 3:00:00 AM8/18/97
to

> ----------
> From: Clay, Kent
> Sent: Monday, August 18, 1997 11:02 AM
> To: Clay, Kent
> Subject: RE: Dataset already used in Image copy
>
>
> Further Explanation:
>
> We had just switched to CDB utilities. CDB has an automation facility
> that eliminates the need for defining GDGs (among other things) when a
> new tablespace is added to the nightly ICs. However, when we set the
> module up to define the backup dataset names, we did not specify the
> EXPDT causing it to take the default of three (3) days. On weekends,
> certain tablespaces are not backed up and, by the time Monday rolled
> around, if the backups happened to run later than their normal run
> time of 11:00 pm, the dataset(s) created the Friday before and having
> the most recent generation numbers, were uncatalogued by MVS resulting
> in the "Dataset already used" error.
>
> A little long-winded, but it now gives the whole picture.
>
> Kent Clay (KC...@Express.Style.com)
>
> ----------
> From: Clay, Kent
> Sent: Friday, August 15, 1997 5:17 PM
> To: 'DB2 Data Base Discussion List'
> Subject: RE: Dataset already used in Image copy

>
>
> We had the same problem for a while. The expiration date on the
> GDG was less than the number of days specified in the MODIFY causing
> the MVS datasets to go bye-bye. When the utility built the next
> generation, based on the generations left after the MVS uncatalog, it
> had a number that was still present in SYSCOPY. Once the GDG
> expiration dates were extended, everything was hunky-dory.
>
> As a little helper-toy, I have a home-grown utility that reads
> SYSCOPY, calls an assembler routine that checks MVS to see if the
> dataset still exists, and displays all occurrences in SYSCOPY that do
> not have a matching MVS dataset. I can whip that sucker out to you if
> you so desire.
>
> Kent Clay (KC...@Express.Style.com)
>
> ----------
> From: Kiran Gunnam[SMTP:kiran....@prudential.com]
> Sent: Friday, August 15, 1997 3:30 PM

> To: DB...@AMERICAN.EDU
> Subject: Dataset already used in Image copy
>
0 new messages