Page 1 of 1

Free unused space of the dataset.

Posted: Thu Oct 30, 2014 12:26 pm
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?

Re: Free unused space of the dataset.

Posted: Thu Oct 30, 2014 6:23 pm
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.

Re: Free unused space of the dataset.

Posted: Sat Nov 01, 2014 12:55 am
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.

Re: Free unused space of the dataset.

Posted: Fri Nov 21, 2014 4:51 pm
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?

Re: Free unused space of the dataset.

Posted: Fri Nov 21, 2014 4:52 pm
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.

Re: Free unused space of the dataset.

Posted: Fri Nov 21, 2014 6:25 pm
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.