View previous topic :: View next topic
|
Author |
Message |
WagnerBil
New User
Joined: 12 Jul 2007 Posts: 1 Location: Brazil
|
|
|
|
PLEASE I AM HAVING PROBLEMS WITH PDS RENAME OF THE IEHPROGM AS ATTACHMENTS. COULD HELP ME?
AWAITING...
THANK YOU!
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
Also, IDCAMS can be used to rename datasets or PDS(E) files. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
anything but IEHPROGM is probably the advice emerging here I suspect! |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
|