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

Rename GDG using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
graswant

New User


Joined: 29 Apr 2006
Posts: 93
Location: Singapore

PostPosted: Wed May 18, 2011 9:40 am
Reply with quote

I am writing a REXX to Move an Id's Physical Datasets under a new pre defined ID/Group.

i.e. HLQ.XYZ.PQR renamed to NEWHLQ.HLQ.XYZ.PQR

I have used ALTER command for NONVSAM.

Code:

NEW = 'TUSRDSN.'                                     
CALL OUTTRAP 'LISTC.'                                 
    "LISTC LVL("HLQ") "                               
CALL OUTTRAP 'OFF'                                   
  DO I = 1 TO LISTC.0                                 
      TEST = WORD(LISTC.I,1)                         
  IF TEST = 'NONVSAM' THEN DO                         
      DSN = WORD(LISTC.I,3)                           
      DSN = STRIP(DSN)                               
      FLQ = NEW||DSN                                 
       X = MSG('OFF')                                 
  "ALTER '"DSN"' NEWNAME('"FLQ"')"                   
  "ALTER '"FLQ"' MANAGEMENTCLASS('MCTMP')"           


I tried using ALTER for GDG however got error msg.

Code:
 

IDC3009I ** VSAM CATALOG RETURN CODE IS 48 - REASON CODE IS IGG0CLE8-26


Need some help on the above. What command can I use to rename GDG?

Regards
Gaurav
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed May 18, 2011 10:28 am
Reply with quote

this may help:

ibmmainframes.com/viewtopic.php?t=19241&start=0
Back to top
View user's profile Send private message
graswant

New User


Joined: 29 Apr 2006
Posts: 93
Location: Singapore

PostPosted: Wed May 18, 2011 11:35 am
Reply with quote

Thanks Dick, well i was hoping to get a quick option like a command but after looking at the link you gave I guess I have to define the base with new names and rename the generations with normal ALTER..
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 18, 2011 5:05 pm
Reply with quote

Can't you use the TSO RENAME command here?
Back to top
View user's profile Send private message
graswant

New User


Joined: 29 Apr 2006
Posts: 93
Location: Singapore

PostPosted: Wed May 18, 2011 6:14 pm
Reply with quote

Rename does not work for GDG.. I used the above approach nd it works
Back to top
View user's profile Send private message
graswant

New User


Joined: 29 Apr 2006
Posts: 93
Location: Singapore

PostPosted: Wed May 18, 2011 6:16 pm
Reply with quote

Superk

I was referring to GDG base when I said rename does not work.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top