IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GDG Error:DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Wed Sep 23, 2009 3:06 pm
Reply with quote

Hi Friends,

I am getting MAXCC 8 while i am trying take the image copy for few of my tables.
Code:
//S05IMAGE EXEC PGM=DSNUTILB,PARM='DB2P,DPTFCOPY',
//         COND=(04,LT)
//STEPLIB  DD DSN=SYS2.DB2P.DSNLOAD,DISP=SHR
//*           ---------------------------OUTPUT--------------------
//SYSCOP01 DD DSN=DMPRO.IMAG.DPTFS.TEVENTSP(+1),
//            DISP=(NEW,CATLG),
//            DCB=(CCPN.MODELDCB,BLKSIZE=28672),
//            UNIT=CART,VOL=(,RETAIN),
//            LABEL=(1,SL,RETPD=0007)
//SYSCOP02 DD DSN=DMPRO.IMAG.DPTFS.TBFASP(+1),
//            DISP=(NEW,CATLG),
//            DCB=(CCPN.MODELDCB,BLKSIZE=28672),
//            UNIT=AFF=SYSCOP01,VOL=(,RETAIN,REF=*.SYSCOP01)
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=D
//*           ---------------------------PARMS---------------------
//SYSIN    DD  *
  COPY TABLESPACE DPTFS.TEVENTSP   COPYDDN SYSCOP01   DEVT CART
  COPY TABLESPACE DPTFS.TBFASP     COPYDDN SYSCOP02   DEVT CART
/*

I remember recently the same job was abended with S04E abend,i had restarted and it went fine.After that this job was giving the following error.
Code:
.DSNU407I    DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY
.                      DDNAME SYSCOP01
.DSNU408I    DSNUBCKB - 'DMPRO.IMAG.DPTFS.TEVENTSP.G4726V00' EXISTS WITH -
.                      VOLUME=(CATG)
.                      FILE SEQUENCE NUMBER=0
.                      RBA=X'09678C301E20'
.                      DATE=09/09/18
.                      TIME=19:27:12
.DSNU012I    DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8



It will be greatful if i get replies at the earliest.Thanks in advance.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Sep 23, 2009 3:11 pm
Reply with quote

Hi There,

Would you please check Status of tablespace. I hope you already terminated previous util.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Sep 23, 2009 3:19 pm
Reply with quote

Quote:
It will be greatful if i get replies at the earliest.Thanks in advance.


The gentlemen who reply do it on their own time and free of charge
if You need something on Your terms(quickly) You should peruse a different source of help (pay)

Code:
.DSNU407I    DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY
.                      DDNAME SYSCOP01

anyway the mesage is clear, isn' t it... You are trying to overwrite a previous still valid image copy...

run the appropriate utilities to clean up the situation
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Sep 23, 2009 3:27 pm
Reply with quote

Suggest you change the name of the data set or use MODIFY utility to delete the old SYSCOPY record containing the duplicate data set.
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Wed Sep 23, 2009 3:38 pm
Reply with quote

Thanks for your replies.

I have terminated the utils and While i am trying to access the current Image Copy generation "DMPRO.IMAG.DPTFS.TEVENTSP.G4726V00" i am getting "No data set names found" error.Still the same error is coming,So i am not sure how to delete this Version.Please help on this situation.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Sep 23, 2009 4:33 pm
Reply with quote

Hello Satmaar,

i think u need to run imagecopy utility again
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Sep 23, 2009 5:45 pm
Reply with quote

the name of vsams are kept in the DB2 catalog (SYSCOPY i believe).
So DB2 knows that you used that name.

I would not advise to start messing in the catalog if you don't know about it.
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Wed Sep 23, 2009 6:53 pm
Reply with quote

GuyC, Could you please let me know how to fix this problem?By removing the current version's record from the table SYSIBM.SYSCOPY will fix the problem?I see recent generation entry in this table.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Sep 23, 2009 7:08 pm
Reply with quote

I don't think you can.
There is something like MODIFY RECOVERY DELETE ....
but that is only for cleaning up the oldest ones, not for the last or one in between.

But keeping a non-existing Image copy shouldn't be a problem. DB2 will know and just skip to the next/previous one.

But yes, you'll have to use another DSNname in the JCL. (like Anuj Dhawan already suggested)
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Thu Sep 24, 2009 9:59 am
Reply with quote

I thank everyone who replied and the information you provided helped me a lot.Have a great day!!!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Thu Sep 24, 2009 10:20 am
Reply with quote

Hi satmaar,

Hopefully we'd been helpful, is the issue resolved now?
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Thu Sep 24, 2009 10:25 am
Reply with quote

Yes Anuj,I skipped the version existing in SYSIBM.SYSCOPY and try to run the next version,(i.e.Instead of +1,i have submitted the job gdg with +2 version and it worked.).Thanks a lot.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Thu Sep 24, 2009 10:58 am
Reply with quote

Glad to hear it's working... icon_smile.gif

Just a terminology note: Here, in this
Quote:
...skipped the version existing in SYSIBM.SYSCOPY
version is not the correct term to use in this context. Generations and versions are both valid when we're talking about GDGs but they have totally different meanings. It should have been "skipped the generation existing in SYSIBM.SYSCOPY ".
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts db2 vs static data COBOL Programming 1
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts External data queue (changes?) CLIST & REXX 0
Search our Forums:

Back to Top