Free unused space of the dataset.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Pooja Vaidya
New Member
Posts: 5
Joined: Thu May 08, 2014 4:54 pm

Free unused space of the dataset.

Post by Pooja Vaidya »

Hi,

The question is simple, How to free unused space of the dataset?

Let's assume, we have created a dataset with out using the RLSE in the JCL and now I want to release the unused SPACE allocated to the dataset then how can I do it? Can we write a separate JCL for that?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Free unused space of the dataset.

Post by Robert Sample »

You can use JCL that references the data set with a RLSE parameter coded on the DD statement. However, be aware that the program you invoke must actually open the data set -- hence using IEFBR14 will not release any space from the data set as it does not open the data set.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Free unused space of the dataset.

Post by nicc »

Or you can use the F command in 3.4 or HMIG followed by HRECA. When freeing note that space will be freed to the allocation unit size so if you have a dataset allocated CYL(2,1) and you use one track then issuing a free will only free up the unused cylinder - you will still have 14 unused tracks allocated.
Regards
Nic
Pooja Vaidya
New Member
Posts: 5
Joined: Thu May 08, 2014 4:54 pm

Re: Free unused space of the dataset.

Post by Pooja Vaidya »

Robert Sample wrote:You can use JCL that references the data set with a RLSE parameter coded on the DD statement. However, be aware that the program you invoke must actually open the data set -- hence using IEFBR14 will not release any space from the data set as it does not open the data set.
I'm not sure hy do you mention about the IEFBR14 here? Are you saying that I should include a step in the JCL having IEFBR14 with a RLSE parameter?
Pooja Vaidya
New Member
Posts: 5
Joined: Thu May 08, 2014 4:54 pm

Re: Free unused space of the dataset.

Post by Pooja Vaidya »

nicc wrote:Or you can use the F command in 3.4 or HMIG followed by HRECA. When freeing note that space will be freed to the allocation unit size so if you have a dataset allocated CYL(2,1) and you use one track then issuing a free will only free up the unused cylinder - you will still have 14 unused tracks allocated.
HMIG did not work at my company. Is there any other command do this? Please advise.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Free unused space of the dataset.

Post by Robert Sample »

I'm not sure hy do you mention about the IEFBR14 here? Are you saying that I should include a step in the JCL having IEFBR14 with a RLSE parameter?
You took the exact opposite meaning of what I said. IEFBR14 does NOT open data sets, hence putting a RLSE on a DD statement that is part of an IEFBR14 execution will not open the data set and will not release any space.

Many people, especially those without much experience, believe that using IEFBR14 will free space if the RLSE subparameter is in the JCL, but they are wrong.
Post Reply

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

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”