Empty PDS using JCL.
-
- New Member
- Posts: 2
- Joined: Wed Dec 10, 2014 5:42 pm
Empty PDS using JCL.
Hi,
In a process execution the process creates many temporary members in 7 PDSes. However, once we are done with the execution, I need to cleanup the temorary memebers. I need to know if we have some JCL that can empty the specified PDS?
In a process execution the process creates many temporary members in 7 PDSes. However, once we are done with the execution, I need to cleanup the temorary memebers. I need to know if we have some JCL that can empty the specified PDS?
- Akatsukami
- Global Moderator
- Posts: 122
- Joined: Tue Oct 20, 2015 3:20 am
- Location: Bloomington, IL
- Contact:
Re: Empty PDS using JCL.
Unless deleting and redefining the data set is acceptable, JCL cannot do what you want. I would use ISPF services, but some of the other sempai may have better suggestions.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
Re: Empty PDS using JCL.
If the name of the temporary PDS members is known we can delete them by using IEFBR14 utility of the JCL. Delete them like any other sequential dataset by giving MVS.USERID.JCL(TEMPMEM) where tempmem is the name of temporary member
- enrico-sorichetti
- Global Moderator
- Posts: 843
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Empty PDS using JCL.
did You test ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

Re: Empty PDS using JCL.
The usual way to do this is to allocate the PDS in step one, use it through the job and then delete it as the last step of the job.
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Empty PDS using JCL.
vikriih, are you aware that IEFBR14 is used for DATA SET deletion? If you provide a PDS with member name, the entire PDS will be deleted -- not just the referenced member.
-
- New Member
- Posts: 2
- Joined: Wed Dec 10, 2014 5:42 pm
Re: Empty PDS using JCL.
Read through all the responses, is there just no way to do it?
We are deleting the entire PDS as of now.
We are deleting the entire PDS as of now.
Re: Empty PDS using JCL.
Yes there is:
Get a list of the members
Take that list and create control cards for the utility to be used
Execute that utility
3 steps but you could roll them into one by using a Rexx program. However, the currentg method is the most efficient.
Get a list of the members
Take that list and create control cards for the utility to be used
Execute that utility
3 steps but you could roll them into one by using a Rexx program. However, the currentg method is the most efficient.
Regards
Nic
Nic
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Empty PDS using JCL.
If they are only temporary, why are they in a permanent library? Do they need to be members at all, can they not just be sequential datasets? Even if they must be members, have you considered using a temporary PDS?
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