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

IDCAMS RENAMING VSAM FILE ALONG WITH ALTERNATE INDEX


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

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Tue Apr 17, 2018 10:42 pm
Reply with quote

Hi,

Is there any way to rename Vsam cluster along with Alternate index and Path dataset without mentioning their names in JCL ?

We can do it using the below JCL
Code:

//MOVEREN  EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
 COPY ALLE ALLD(*) SPHERE NMC NSC ADMIN OPT(3) TGTA(SRC) -
    CATALOG DELETE PURGE -
    DS(INC( -
    IGCF.TEST.KSDS     -
    IGCF.TEST.AIX      -
    IGCF.TEST.PATH     -
     )) -
    RENAMEU( -
   (IGCF.TEST.KSDS,   -
    IGCF.TEST.KSDS.NEW) -
   (IGCF.TEST.AIX,   -
    IGCF.TEST.AIX.NEW) -
   (IGCF.TEST.PATH,  -
    IGCF.TEST.PATH.NEW) -
     )
/*


My query is , Can we mention only Base cluster name and that will consider Alternate index and Path dataset(Without mentioning them in JCL)?

Thanks!
Back to top
View user's profile Send private message
Benchwarmer

New User


Joined: 16 Jul 2016
Posts: 22
Location: desk

PostPosted: Wed Apr 18, 2018 12:24 am
Reply with quote

I do not know there is such functionality exists. But am curious to know the reason behind to look for such function?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 18, 2018 1:08 am
Reply with quote

Quote:
Is there any way to rename Vsam cluster along with Alternate index and Path dataset without mentioning their names in JCL ?
It is not at all clear what you are asking, since the JCL you posted does not have any names in the JCL -- they are parameters to ADRDSSU, which is not JCL (just as SORT commands are not JCL).

From the manual (emphasis added by me):
Quote:
z/OS DFSMSdss Storage Administration
SC23-6868-01

>>-+--------+--------------------------------------------------><
'-SPHERE-'

SPHERE specifies that, for any VSAM cluster copied, all associated AIX® clusters and paths are to be copied. Individual names of sphere components do not need to be specified. Only the base cluster name is required. If output volumes are specified, the volumes on which the AIX clusters reside do not need to be specified.
So assuming you are asking about the ADRDSSU parameters, the answer is that with SPHERE only the base cluster name is required.
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Wed Apr 18, 2018 8:57 am
Reply with quote

Hi,

Using the below code am deleting base cluster and Copying to new cluster
Form :
IGCF.TEST.KSDS
IGCF.TEST.AIX
IGCF.TEST.PATH

To
IGCF.TEST.KSDS .NEW ( Along with .NEW , DATA AND INDEX Files)
IGCF.TEST.AIX .NEW
IGCF.TEST.PATH .NEW

Code:

//MOVEREN  EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
 COPY ALLE ALLD(*) SPHERE NMC NSC ADMIN OPT(3) TGTA(SRC) -
    CATALOG DELETE PURGE -
    DS(INC( -
    IGCF.TEST.KSDS     -
    IGCF.TEST.AIX      -
    IGCF.TEST.PATH     -
     )) -
    RENAMEU( -
   (IGCF.TEST.KSDS,   -
    IGCF.TEST.KSDS.NEW) -
   (IGCF.TEST.AIX,   -
    IGCF.TEST.AIX.NEW) -
   (IGCF.TEST.PATH,  -
    IGCF.TEST.PATH.NEW) -
     )
/*


In our environment we will receive a request to rename Vsam clusters .Sometimes they will be in thousands. But they wont provide Alternate index and Path information. So we need to identify Alternate index and Path details and manually copy them to JCL. To avoid this am looking for some options where if we mention Base cluster name without Alternate index and Path. It should rename Base cluster,Alternate Index and Path. Want a JCL something like below

Code:


//MOVEREN  EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
 COPY ALLE ALLD(*) SPHERE NMC NSC ADMIN OPT(3) TGTA(SRC) -
    CATALOG DELETE PURGE -
    DS(INC( -
    IGCF.TEST.KSDS     -
        )) -
    RENAMEU( -
   (IGCF.TEST.KSDS,   -
    IGCF.TEST.KSDS.NEW) -
       )
/*


Expected Result as below :-

IGCF.TEST.KSDS .NEW
IGCF.TEST.AIX .NEW
IGCF.TEST.PATH .NEW

Is there anyway to do that?

Thanks!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Apr 18, 2018 12:21 pm
Reply with quote

IIRC
if You had chosen a different name pattern You could have used something along the lines of ...

Code:
 COPY ALLE ALLD(*) SPHERE NMC NSC ADMIN OPT(3) TGTA(SRC) -
    CATALOG DELETE PURGE -
    DS(INC( -
    IGCF.TEST.KSDS     -
        )) -
    RENAMEU( <thenewhighlevelqualifier>.* )
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 734
Location: Denmark

PostPosted: Wed Apr 18, 2018 12:56 pm
Reply with quote

Off hand I would say no as alternate index datasets are created seperately from the base cluster.
Why don't you just go ahead and try (with a test cluster of course)?
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Wed Apr 18, 2018 2:11 pm
Reply with quote

Hi Enrico,

I have tried the below Job but failed.
Code:

//MOVEREN  EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
 COPY ALLE ALLD(*) SPHERE NMC NSC ADMIN OPT(3) TGTA(SRC) -
    CATALOG DELETE PURGE -
    DS(INC( -
    IGCF.TEST.KSDS -
     )) -
    RENAMEU( -
   (IGCF.TEST.*    , -
    IGCF.TEST.*.NEW) -
     )
/*


OUTPUT :

Code:

ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'COPY '
ADR109I (R/I)-RI01 (01), 2018.108 09:34:09 INITIAL SCAN OF USER CONTROL STATEMENT FOR THIS TASK
ADR016I (001)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK
ADR006I (001)-STEND(01), 2018.108 09:34:09 EXECUTION BEGINS
ADR468E (001)-DDFLT(05), VSAM DATA SET IGCF.TEST.KSDS IN CATALOG USER.S1TT001.CATALOG IS NOT PROCESSABLE
ADR801I (001)-DDDS (01), 2018.108 09:34:09 DATA SET FILTERING IS COMPLETE. 1 OF 1 DATA SETS WERE SELECTED: 0 FAILED SERIALIZATION
                         AND 0 FAILED FOR OTHER REASONS
ADR455W (001)-DDDS (01), THE FOLLOWING DATA SETS WERE NOT SUCCESSFULLY PROCESSED
                          IGCF.TEST.KSDS
                            AIX: IGCF.TEST.AIX
                              PATH: IGCF.TEST.PATH
ADR006I (001)-STEND(02), 2018.108 09:34:09 EXECUTION ENDS
ADR013I (001)-CLTSK(01), 2018.108 09:34:09 TASK COMPLETED WITH RETURN CODE 0008
ADR012I (SCH)-DSSU (01), 2018.108 09:34:09 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0008 FROM:
                         TASK    001



Thanks!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Apr 18, 2018 3:59 pm
Reply with quote

You did not use my suggestion icon_evil.gif
You just invented something icon_cool.gif
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Wed Apr 18, 2018 4:11 pm
Reply with quote

Hi Enrico,

What do you want me to mention here.


Code:

RENAMEU( <thenewhighlevelqualifier>.* )


Like if I want to rename my cluster as below

Form :
IGCF.TEST.KSDS
IGCF.TEST.AIX
IGCF.TEST.PATH

To
IGCF.TEST.KSDS .NEW ( Along with .NEW , DATA AND INDEX Files)
IGCF.TEST.AIX .NEW
IGCF.TEST.PATH .NEW


Ex :

Code:

RENAMEU(IGCF.TEST.KSDS.NEW.*)


Thanks!
Upendra.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Apr 18, 2018 4:19 pm
Reply with quote

looks like You did not care to try to understand my post.

the spirit of a forum is not to diaper people asking fo help
but to give enough hints so that they will be able WITH THE HELP OF THE MANUAL to find a solution by themselves

there is no reason for anybody to rewrite the manual,
the explanation of the renameu clause is clear enough
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Apr 18, 2018 4:31 pm
Reply with quote

Going nowhere. I will lock this later today - if it has not already been locked by someone else.
Back to top
View user's profile Send private message
upendrasri

Active User


Joined: 28 Sep 2017
Posts: 124
Location: India

PostPosted: Wed Apr 18, 2018 4:36 pm
Reply with quote

Hi, Sorry.. I will work on it.

Thanks all for your suggestions..
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Sat Jun 09, 2018 9:32 pm
Reply with quote

With DFDSS RESTORE you HAVE to specify the Base Cluster and each AIX and PATH name in the RENAMEU statements if you're changing the number of qualifiers in the names. If you just put the new name for the Base only, then the AIX's and PATH's would attempt to be restored with their original names.

If you're just changing the high level qualifier then as Enrico suggests you can just specify RENAMEU(NEWHLQ) and that would work, all elements of the SPHERE would be restored with the new HLQ and the rest of their qualifiers the same as the originals.

You can also do masked restores for other qualifiers to some extent but it's a bit fiddly.
e.g.
RENAMEU( HLQ.OLD.** -
HLQ.NEW.** )
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 Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts VSAM LISTCAT INFORMATION JCL & VSAM 2
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top