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
 

 

IEHPROGM - HOW TO RENAME A PDS ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
WagnerBil

New User


Joined: 12 Jul 2007
Posts: 1
Location: Brazil

PostPosted: Wed Aug 12, 2015 6:08 pm    Post subject: IEHPROGM - HOW TO RENAME A PDS ?
Reply with quote

PLEASE I AM HAVING PROBLEMS WITH PDS RENAME OF THE IEHPROGM AS ATTACHMENTS. COULD HELP ME?

AWAITING...
THANK YOU!

icon_rolleyes.gif
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 12, 2015 6:31 pm    Post subject:
Reply with quote

The syntax, from the manual, is
Code:
RENAME DSNAME=name,VOL=device=(list),NEWNAME=name
Your utility control statements do not match the manual. Change them to match the manual.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Aug 12, 2015 6:33 pm    Post subject: Reply to: IEHPROGM - HOW TO RENAME A PDS ?
Reply with quote

Trusty reference-work wrote:
IEH202I
INVALID KEYWORD OR CONTROL STATEMENT SYNTAX
Explanation

In the utility statement preceding this message, the required keyword is incorrect, or the continuation does not start in column 16.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Wed Aug 12, 2015 7:40 pm    Post subject:
Reply with quote

As Mr. Sample says, the syntax of your IEHPROGM control statement does not match the manual. IEHPROGM is extremely picky about this.

Using IEHPROGM to rename a cataloged or SMS managed data set has all sorts of issues that can lead a beginner into trouble. Something like this is much simpler and safer.
Code:
//RENAME  PROC DSN='?',NEWNAME='?'
//TSO     EXEC PGM=IKJEFT01,
//             PARM='RENAME ''&DSN'' ''&NEWNAME'''
//SYSTSPRT DD  SYSOUT=*
//SYSTSIN  DD  DUMMY
//        PEND
//TEST    EXEC RENAME,
//             DSN='xxx',
//             NEWNAME='yyy'
This JCL defines an instream cataloged procedure that executes TSO in batch to run the TSO RENAME command through the EXEC statement PARM parameter.

When I started with System/360 47 years ago uncataloged data sets were much more common than now; using IEHPROGM to manipulate the VTOC was quite common. Now uncataloged data sets are very rare, so using IEHPROGM is very unusual.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Wed Sep 09, 2015 12:33 am    Post subject:
Reply with quote

DFDSS (ADRDSSU) is also a more reliable way to rename as it takes care of things like VSAM components and associations.
This example assume the dataset is cataloged and will let SMS decide where the newname version will be allocated.

Code:
//STEP EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//SYSIN       DD *
 COPY ALLE ALLD(*) TGTA(SRC) CAT DEL TGTGDS(ACTIVE) -
  SHR TOL(ENQF) -
  DS(INC( -
               P0BSXH.BXP.FONTES.ADMR.NEW -
               )) -
  RENAMEU( P0BSXH.BXP.FONTES.ADMR.NEW -
                  P0BSXH.BXP.FONTES.ADMR.TESTE )



For uncataloged datasets it becomes a physical copy so extra parameters are required for the volsers, and some like CAT (short for catalog) may be removed

INDYNAM(volser)
OUTDYNAM(volser)
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Wed Sep 09, 2015 7:13 pm    Post subject:
Reply with quote

Also, IDCAMS can be used to rename datasets or PDS(E) files.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Wed Sep 09, 2015 7:52 pm    Post subject:
Reply with quote

anything but IEHPROGM is probably the advice emerging here I suspect!
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Wed Sep 09, 2015 9:21 pm    Post subject:
Reply with quote

Pete Wilson wrote:

anything but IEHPROGM is probably the advice emerging here I suspect!


Yes, IEHPROGM is not a good choice to rename a data set. I think all of us white beards will pretty much agree.

Mr. Heize's observation about IDCAMS is pretty much on target, though I think in some respects the TSO RENAME command is safer. RENAME will handle the situation when the data set's high level qualifier moves the data set entry to a different catalog. IDCAMS ALTER NEWNAME will not do this correctly. The effect will be to lose the data set.
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 -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Generic rename by pattern‏ Steve Coalbran CLIST & REXX 6 Mon May 30, 2016 9:34 pm
No new posts How to use REXX to rename list of VSA... jackzhang75 CLIST & REXX 10 Wed Jun 03, 2015 11:25 pm
No new posts Can i user rexx to rename sequential ... jackzhang75 CLIST & REXX 3 Sat Nov 15, 2014 1:11 am
No new posts Mass rename of PDS members prino CLIST & REXX 13 Fri May 30, 2014 6:10 pm


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