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

How to find orphaned MCDS D records.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Thu Mar 18, 2021 12:05 am
Reply with quote

Hi Team,

Can someone help me with the JCL to find the list of orphaned DFHSM MCDS D records.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Thu Mar 18, 2021 12:21 am
Reply with quote

Use DFHSM's enhanced AUDIT functions:
Code:
HSEND AUDIT DATASETCONTROLS(MIGRATION) NOFIX ODS(<output_dsn>)


See: https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.arcf000/hsmsareference.htm
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2145
Location: USA

PostPosted: Thu Mar 18, 2021 5:56 pm
Reply with quote

JCL cannot do it.
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Thu Mar 18, 2021 6:41 pm
Reply with quote

Hello Joerg.

thank you for the above command. I could see lot of datasets are missed in the output. From the MCDS decollect report I found few datasets which don't have catalog entry but MCD record exist's in the MCDS.

hsend list dsn(TST.D7GT.DATA.DUBAI.G1510V00) MCDS term

DSN=TST.D7GT.DATA.DUBAI.G1510V00 MIGVOL=AT0418 DSO=PS SDSP=NO
LAST REF=17/05/19 MIG=17/05/20 TRKS=00000015 2K BLKS= ******* TIMES MIG= 00001
16K BLKS=0000000013 LAST MIGVOL=*NONE*
ENCRYPTION TYPE=*******
KEYLABEL=****************************************************************

No catalog entry exist's for the same.
TST.D7GT.DATA.DUBAI.G1510V00 No data set names found

Can you please tell me how these dataset's are missed in the
HSEND AUDIT DATASETCONTROLS(MIGRATION) NOFIX ODS(<output_dsn>) output.

Please advice.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Mar 18, 2021 8:00 pm
Reply with quote

if no entry exists in the catalog for a dataset in a GDG. the dataset is gone
so if the MCDS entry is missing .. that's part of the logic
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Thu Mar 18, 2021 8:03 pm
Reply with quote

hit the back button and got a duplicate post
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Thu Mar 18, 2021 8:32 pm
Reply with quote

When you try to AUDIT the DSN, do you see an error then?
Code:
HSEND AUDIT DSN(TST.D7GT.DATA.DUBAI.G1510V00) MCDS TERM

I would expect something like *ERR 03.
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Thu Mar 18, 2021 8:43 pm
Reply with quote

Hi Joerg,

Thank you for the quick response.

I got what you excepted.

AUD=DS DSN=TST.D7GT.DATA.DUBAI.G1510V00 ERROR TYPE= *ERR 03
DSN ON VOL=?????? CTLG VOL=-NONE- MIG VOL= AT0418 BACK VOL=-NONE-

Any particular reason why it was not shown in the below output:

AUDIT DATASETCONTROLS(MIGRATION) NOFIX ODS(PK$Z1L4.ORPHAN.MCDSREC)
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Thu Mar 18, 2021 9:05 pm
Reply with quote

On my side I get what's to be expected. Could you please check the output again for 'ERR 03' msgs?
Code:
 COMMAND ENTERED:                                                       
 AUDIT DSCTL(MIGRAT) NOFIX ODS(<MYDSN>)                                       
                                                                       
 /* ERR 03 DSN1.SHOWMVS.IPL.G0053V00 NOT CATALOGED, HAS MIGRATION COPY +
 /* HSM.HMIG.T051013.DSN1.SHOWMVS.B0177                                 
 /* ERR 03 DSN1.SHOWMVS.IPL.G0054V00 NOT CATALOGED, HAS MIGRATION COPY +
 /* HSM.HMIG.T051013.DSN1.SHOWMVS.B0075                                 
 - END OF -     ENHANCED AUDIT - LISTING -
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Mar 19, 2021 12:52 am
Reply with quote

Please, try also the Original AUDIT command. It is not recommended by IBM anymore but maybe lists at least some of your orphaned entries.
Code:
HSEND AUDIT MCDS LEVEL(TST.D7GT) FIX REPORT(ALL) ODS(<your_output_dsn>)

Instead of REPORT(ALL) you can substitute also REPORT(ERR), however results may be incomplete.

Look for the following columns:
Code:
DATA SET ON     CATALOGED     MIGRATED
  VOLUME        TO VOLUME    TO VOLUME
                                       
  ??????         -NONE-        FT4818 
  ??????         -NONE-        FS1001 
  ??????         -NONE-        FS3826 
  ??????         -NONE-        FS1888 
  ??????         MIGRAT        FT0526
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Fri Mar 19, 2021 2:12 am
Reply with quote

Hi Joerg,

The audit command is still running and hopefully this time the missing files will also be captured.

Thank you so much for the help.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Fri Mar 19, 2021 2:26 am
Reply with quote

The REPORT(ALL) will produce a full listing, not only errors. That's the reason why it takes some time to complete.

Besides that, please check if you have other errors in the Control Datasets as well. I have not yet an explanation at hand why the DSCTL(MIG) did not work for you. That in general would be:
Code:
HSEND AUDIT VOLUMECONTROLS(MIGRATION) NOFIX ODS(<output_dsn>)
HSEND AUDIT VOLUMECONTROLS(BACKUP) NOFIX ODS(<output_dsn>)
HSEND AUDIT VOLUMECONTROLS(RECOVERABLE) NOFIX ODS(<output_dsn>)
HSEND AUDIT DATASETCONTROLS(MIGRATION) NOFIX ODS(<output_dsn>)
HSEND AUDIT DATASETCONTROLS(BACKUP) NOFIX ODS(<output_dsn>)
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Tue Mar 30, 2021 3:29 pm
Reply with quote

You can have MCD records remaining in the MCDS after datasets are deleted depending on the MIGRATIONCLEANUPDAYS value in the DFHSM parmlib.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Tue Mar 30, 2021 4:07 pm
Reply with quote

This is true for MIGRATIONCLEANUPDAYS, but they would not be reported by IDCAMS DCOLLECT. Best way to find issues in the CDS are the recommended AUDIT functions.
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Tue Mar 30, 2021 6:39 pm
Reply with quote

Hi Team,

Thank you very much for all your responses.
I will check the DFHSM ARC member for MIGRATIONCLEANUPDAYS value and update it accordingly.

Regards,
Praveen
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Tue Mar 30, 2021 6:53 pm
Reply with quote

Still worth investigating errors, although it can be very time consuming. Audit errors are explained here:

your www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.arcf000/hr2007.htm#hr2007
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Tue Apr 27, 2021 7:53 pm
Reply with quote

Hi Team,

Is there a way to list all the backup datasets from BCDS apart from decollect report.

Here is the question I have to answer.

Number of archived datasets? Number of backup datasets?

Thank you in advance!!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1337
Location: Bamberg, Germany

PostPosted: Tue Apr 27, 2021 8:40 pm
Reply with quote

Yes, but open a new thread.
Back to top
View user's profile Send private message
Praveen Kumar Kolar

New User


Joined: 18 Mar 2021
Posts: 31
Location: India

PostPosted: Tue Apr 27, 2021 8:50 pm
Reply with quote

Hi Joerg.

Sure. I will do.

Thank you
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 combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Compare 2 alphabets in a REXX and fin... CLIST & REXX 2
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 5
Search our Forums:

Back to Top