Page 1 of 1

Copy table space; Jcl RC 8

PostPosted: Tue Apr 16, 2013 7:27 pm
by gokulNmf
HI,
We have a job at our site, which refreshes the MQT, once the MQTs are refreshed, Copy tablespace job runs. Find below the JCL. But job errors with RC 8 and the error message is as quoted below. There is IEFBR14 step in the job which deletes the previous run file, but still this error is coming up.

Can any one clarify why this might happen and suggest a corrective action.

Error Message:
DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = BMCSTATS
DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNUGUTC - COPY TABLESPACE MMDBTPRF.MMQSTPR1 COPYDDN(C001)
DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY


//*---------------------------------------------------------------------
//*       DELETE PREVIOUS RUN FILES                                     
//*---------------------------------------------------------------------
//DELETE01 EXEC PGM=IEFBR14                                             
//OUT01    DD DSN=DSR.TEMP.DS0R.MMQSTPR1.#130412.C001,                   
//            DISP=(MOD,DELETE,DELETE)                                 
//OUT02    DD DSN=DSR.TEMP.DS0R.MMQSTPR2.#130412.C002,                   
//            DISP=(MOD,DELETE,DELETE)                                 
//OUT03    DD DSN=DSR.TEMP.DS0R.MMQSTPR3.#130412.C003,                   
//            DISP=(MOD,DELETE,DELETE)                                 
//*---------------------------------------------------------------------
//*       COPY INDEX FOR THE TABLES.                                   
//*---------------------------------------------------------------------
//COPYIND  EXEC PGM=DSNUTILB,PARM=(DS1R,'BMCSTATS'),                   
//         REGION=0M,MEMLIMIT=NOLIMIT                                   
//STEPLIB  DD DSN=DSNVS.PROD.BMC.DS0R.BMCLOAD,DISP=SHR                 
//         DD DSN=DSNVS.PROD.DS0R.SDSNEXIT,DISP=SHR                     
//         DD DSN=DSNVS.PROD.DS0R.SDSNLOAD,DISP=SHR                     
//SYSEXEC  DD DSN=DSNVS.PROD.BMC.DS0R.BMCREXX,DISP=SHR                 
//ABNLIGNR DD DUMMY                                                     
//DSSPRINT DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//UTPRINT  DD SYSOUT=*                                                 
//RNPRIN01 DD SYSOUT=*                                                 
//STPRIN01 DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *
COPY                             
  TABLESPACE MMDBTPRF.MMQSTPR1   
    COPYDDN(C001)               
COPY                             
  TABLESPACE MMDBTPRF.MMQSTPR2   
    COPYDDN(C002)               
COPY                             
  TABLESPACE MMDBTPRF.MMQSTPR3   
    COPYDDN(C003)               
//*                                                                     
//C001     DD DSN=DSR.TEMP.DS0R.MMQSTPR1.#130412.C001,                   
//            DISP=(NEW,CATLG,CATLG),                                   
//            SPACE=(CYL,(428,32),RLSE),
//            UNIT=SYSDA                                               
//C002     DD DSN=DSR.TEMP.DS0R.MMQSTPR2.#130412.C002,                   
//            DISP=(NEW,CATLG,CATLG),                                   
//            SPACE=(CYL,(568,92),RLSE),
//            UNIT=SYSDA                                               
//C003     DD DSN=DSR.TEMP.DS0R.MMQSTPR3.#130412.C003,                   
//            DISP=(NEW,CATLG,CATLG),                                   
//            SPACE=(CYL,(584,96),RLSE),
//            UNIT=SYSDA                                               
//*--------------------------------------------------------------------
//*                       END OF JOB                                   
//*--------------------------------------------------------------------

Re: Copy table space; Jcl RC 8

PostPosted: Tue Apr 16, 2013 7:38 pm
by enrico-sorichetti
what does
DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY

message suggest ???

please learn to post the FULL message inclusive of the message number as
DSNU407I    DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY


what happened when You looked up the message Yourself,
because You did ! didn' t You ? :geek:

anyway the mesage is clear,
You are trying to overwrite a previous still valid image copy, run the appropriate utilities to clean up the situation

Re: Copy table space; Jcl RC 8

PostPosted: Tue Apr 16, 2013 9:28 pm
by gokulNmf
Enrico,
Going forward, i will try to copy the whole length, as the length exceed 80, full text was not appearing on the screen .

I have a delete step before the copy step, but still this is happening. If IEFBR14 will not do the job, can you let me know some other utility which can clean up this.


TIA

Re: Copy table space; Jcl RC 8

PostPosted: Tue Apr 16, 2013 9:47 pm
by enrico-sorichetti
from Your question, it is pretty clear that You did not care to research the message Yourself :evil:
the action to be carried on is pretty well described in the manual itself.
so You know where to start from

by deleting a still active image copy You probably flucked up a few things
get in touch as soon as possible with Your DBA

Re: Copy table space; Jcl RC 8

PostPosted: Thu Apr 18, 2013 2:36 am
by gokulNmf
Its not that I dint care to research. I am not DBA, i am Cobol coder. Beyond some point I was not able to understand DBA's work, as i dont have much technical knowledge on that(even after referring DB2 Utility guide) . After all i was able to find that these DS names where present in SYSCOPY catalog tables.

Thanks for the Info. We struggled to contact the CA7 people for some options of Appending date to the Dataset name, but it went futile and decided to use GDG for the same.

Re: Copy table space; Jcl RC 8

PostPosted: Thu Apr 18, 2013 1:30 pm
by enrico-sorichetti
I am not DBA, i am Cobol coder

that' s why You are not supposed to meddle with image copies handling

let the DBA earn his salary :geek:

Re: Copy table space; Jcl RC 8

PostPosted: Sat Aug 30, 2014 4:20 pm
by pranav283
@ gokulNmf,

First of all u shd have mentioned the dataset name corresponding to which tablespace copy function cant be performed (asp er the sysprint).

But its fine, let us assume that the datsaet name (in most of the cases), a GDG's name is DOC.ABC.G0001V00 on which ur image copy job threw the error.

The error message 'dataset already used for previous image copy'
pertaining to:

DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = BMCSTATS
DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNUGUTC - COPY TABLESPACE MMDBTPRF.MMQSTPR1 COPYDDN(C001)
DSNUBCKB - DATA SET ALREADY USED FOR PREVIOUS IMAGE COPY

means that MMDBTPRF -> database and MMQSTPR1 -> tablespace which is getting copied to the DDNAME 'C001' which supposedly is 'DOC.ABC.G0001V00'.

Now, what happens is that whenever we try to perform an image copy on a tablespace on a dataset using the COPY function, an entry of the physical dataset name and the tablespace is stored in the table SYSIBM.SYSCOPY. Now, since the image copy have had already been performed on this tablespace 'MMQSTPR1' over the dataset ''DOC.ABC.G0001V00' earlier (prior to running ur job), that is why it will not make another entry in the SYSIBM.SYSCOPY table as that will not allow it to store duplicate values in a same table (basic database rules).
Now, you might be wondering that y in God's name DOC.ABC.G0001V00 was already used to create the image copy of the tablespace MMQSTPR1.
Let me tell u that the job might have run number of times and when it all the generations wd have been scratched (not deleted but uncatalogued) , therefore it is trying to create the +1 generation and as the generations might have been uncatalogued, only the base is left and thus +1 given in ur image copy step will try to create the DOC.ABC.G0003V00 and will abend with the above issue.

Kindly acknowledge once u have understood it.
Thanks,
Pranav

Re: Copy table space; Jcl RC 8

PostPosted: Sat Aug 30, 2014 4:22 pm
by pranav283
sry,


correcting the last statement ''DOC.ABC.G0001V00 and will abend with the above issue.''

Re: Copy table space; Jcl RC 8

PostPosted: Sat Aug 30, 2014 4:57 pm
by BillyBoyo
Welcome to the forum.

Don't take this the wrong way :-)

There is not much point in replying to five-year-old topics. No-one is going to test what you say.

Also, please use full English words and accurate technical terms. This is a professional forum, even though it is for Beginners and Students. Mainframes don't "throw" anything. y, u, ur and suchlike should all be spelled in full. Would you write like that in your job? Then don't write like that here, please.

Re: Copy table space; Jcl RC 8

PostPosted: Sat Aug 30, 2014 5:34 pm
by pranav283
Hi BillyBoyo,

I understand that there is no point in replying to five year old topics but there is no point in highlighting that also !!

All I was trying to do is share my knowledge and I shouldn't be bothered by the time gap especially when I am new to the group.
Also, In case you didn't notice, the last thread was not 5 years ago.

And yes, with due respect, jobs do 'throw' error as I suppose the reference is valid and acceptable. :)

However, I appreciate your concern and ensure that I don't use incomplete words and/or unaccepted grammar.
Thanks.