Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Rename GDG using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Rename GDG using REXX
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: 6968
Location: porcelain throne

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

this may help:

http://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    Post subject: Thanks Dick
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

Moderator Team Head


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

PostPosted: Wed May 18, 2011 5:05 pm    Post subject: Reply to: Rename GDG using REXX
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    Post subject: Reply to: Rename GDG using REXX
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts Passing data from REXX to C programme... chong.zhou All Other Mainframe Topics 0 Wed Jul 26, 2017 4:55 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us