Page 1 of 1

iehprogm utility?

PostPosted: Sat Sep 01, 2012 10:28 am
by kandrepavan
Hi All,

I Want to Rename a Dataset using IEHPROGM utility.. my code is as follows. But it is giving an error.
//STEP01 EXEC PGM=IEHPROGM                                             
//DD1 DD UNIT=3390,VOL=SER=CCHN07,DISP=OLD                             
//SYSIN    DD *                                                       
  RENAME DSNAME=CCHN635.JCL.PROG,VOL=3390=CCHN07,                     
  NEWNAME=CCHN635.JCL.PROG1                                           
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//     

Error Is:
********************************* TOP OF DATA **********************************
SYSTEM SUPPORT UTILITIES ---- IEHPROGM

RENAME DSNAME=CCHN635.JCL.PROG,VOL=3390=TCHN07, X
NEWNAME=CCHN635.JCL.PROG1
IEH202I INVALID KEYWORD OR CONTROL STATEMENT SYNTAX

UTILITY END
******************************** BOTTOM OF DATA ********************************

Please help me out what is the Error in this code

Re: iehprogm utility?

PostPosted: Sat Sep 01, 2012 10:58 am
by expat
1) Read the manual and use exactly what is suggested for continuation.

2) Use IDCAMS instead

Re: iehprogm utility?

PostPosted: Sat Sep 01, 2012 11:33 am
by steve-myers
As expat says, IEHPROGM has very strict (and very old fashioned) rules about continuation, which you do not appear to be following.

If the TCHN07 volume is SMS managed, stay away from IEHPROGM.

If the dataset is cataloged, use IDCAMS ALTER xxx NEWNAME(yyy), or use the TSO RENAME command using the TSO in batch JCL.

Re: iehprogm utility?

PostPosted: Mon Sep 03, 2012 12:16 pm
by jaggz
Hi,

"When renaming an SMS-managed data set, IEHPROGM will uncatalog the data set and then catalog the data set under its new name in the appropriate catalog."

Can you check if "CCHN635.JCL.PROG1" if it exist already ?

Jaggz