Rename a dataset name in JCL?
Rename a dataset name in JCL?
Is there a possibility to rename a dataset name in JCL itself? Can you please suggest a sample code.
- Robert Sample
- Global Moderator
- Posts: 1891
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Rename a dataset name in JCL?
JCL executes programs and allocates resources for those programs. Hence, using pure JCL you cannot rename a data set (nor can you sort it nor ...). You could use the IDCAMS utility to rename a data set, but that is not pure JCL.
Re: Rename a dataset name in JCL?
HI,
I have used the following JCL
I have used the following JCL
Code: Select all
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER my.file -
NEWNAME(my.new.file)
Re: Rename a dataset name in JCL?
You have obviously not read AND understood Robert's reply. What follows your //SYSIN DD * is not JCL but IDCAMS control cards.I have used the following JCL
Regards
Nic
Nic
Re: Rename a dataset name in JCL?
I understood that. But then if I don't ask the question right way, how should I ask such a question?
Re: Rename a dataset name in JCL?
Quite simple:
I have used the following JCL and control cards
I have used the following JCL and control cards
Regards
Nic
Nic
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute