View previous topic :: View next topic |
Author |
Message |
HP_Steve Beginner
Joined: 09 Jul 2008 Posts: 6 Topics: 3
|
Posted: Fri Oct 30, 2009 2:11 pm Post subject: Releasing space in an empty dataset |
|
|
Hi,
I am using the partial release RLSE sub-parameter in my space allocation for sequential datasets. I have two datasets I am creating. I allocate both with these parms:-
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=32756,BLKSIZE=32760,
// RECFM=VB,DSORG=PS),
// SPACE=(CYL,(5,1),RLSE),AVGREC=U
File 1 is written to, and if I don't use 5 cylinders, the space is de-allocated as expected.
File 2 is empty, but at the end of the job, the space allocation remains at 5 cylinders. I guess maybe this is because the program, (which I don't control), did not open it for writing. Is there any other JCL parm I can use that will de-allocate the space, when the file is empty?
I don't know in advance of the job submission if the dataset will remain empty or not.
Thanks,
Steve. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Oct 30, 2009 2:33 pm Post subject: |
|
|
HP_Steve,
You can add a IEFBR14 step to release the unused space
Code: |
//LASTSTEP EXEC PGM=IEFBR14
//OUT1 DD DSN=your output file1,
// DISP=(MOD,CATLG,CATLG),
// SPACE=(TRK,(1,0),RLSE)
//*
//OUT2 DD DSN=your output file2,
// DISP=(MOD,CATLG,CATLG),
// SPACE=(TRK,(1,0),RLSE)
|
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Oct 30, 2009 3:06 pm Post subject: |
|
|
Why would running a BR14 step release the space? Isn't the freeing of the space done when the data set is closed? (I haven't tried this, so I'm not saying it doesn't work) _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Oct 30, 2009 4:20 pm Post subject: |
|
|
The IEFBR14 method didn't work for me.
I have used SPACE=(TRK,(1,90),RLSE) so the unopened file is only 1 track. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Fri Oct 30, 2009 6:23 pm Post subject: |
|
|
If the file does not need to exist if empty, you could check for an empty file and delete it if empty as the last step of the job. _________________ ....Terry |
|
Back to top |
|
 |
RonB Beginner
Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
|
Posted: Fri Oct 30, 2009 8:17 pm Post subject: |
|
|
I'm not sure that any test for "emtpy" would actually "work" for a dataset that was never opened/closed, since there is no way to guarantee that the dataset could be successfully 'opened" and/or "read" in order to determine whether any records exist in the dataset or not. _________________ A computer once beat me at chess, but it was no match for me at kick boxing. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Oct 30, 2009 9:41 pm Post subject: |
|
|
You can also allocate it as SPACE=(TRK,(0,1)) (with RLSE optional) and if it never gets opened, no space will be allocated. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Sat Oct 31, 2009 9:37 am Post subject: |
|
|
If the SMS ACS routines are set up correctly, then HSM will release any unused space during the secondary space management cycle. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Oct 31, 2009 12:04 pm Post subject: |
|
|
semigeezer,
I remember that If the shop is SMS managed then IEFBR14 will set the EOF marker which would release the space
Kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Oct 31, 2009 5:26 pm Post subject: |
|
|
I *think* DADSM would only write an EOF mark on the initial allocation but since the data set already exists, it won't do that. But then again, if writing the initial EOF would release space upon allocation, then I'd think space would get released before the program ever got control since the allocations (and EOF mark) happen before the program gets called. DS1LSTAR could get updated in the DSCB but the space allocation should not change. I don't really know much about it though so it is all speculation on my part.
Just for completeness (Kolusu, I know you know this- I mention it only for passing readers), I'll mention that IEFBR14 doesn't do anything at all, and that all of the allocations done for steps that run IEFBR14 or any other program are done by the system while starting or terminating a job step. It is misleading to say that IEFBR14 does <whatever> but it is a common practice and should be understood to mean JES or the JCL interpreter does <whatever>.
Someone please correct me here -- which component does the actual allocations? JES? JES2 at runtime, JES3 at interpret time? something like that. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Sun Nov 01, 2009 11:31 am Post subject: |
|
|
Of course, the correct solution is to make the program open and close the dataset even if it is not going to be written to. Solves a number of other little nasties, ONCODE 41 (or is it 42?); allocating over an old dataset, or part thereof, of the same characteristics which could then be read (this happened to us so it became compulsory to open/close files); etc.
The other option is to not use IEFBR14 but write a little program that does nothing but open and close all files in the jobstep. I had 2 of those which worked slightly differently from each other. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
HP_Steve Beginner
Joined: 09 Jul 2008 Posts: 6 Topics: 3
|
Posted: Tue Nov 03, 2009 12:57 pm Post subject: |
|
|
Thanks for the responses. Seems like there are a number of things I can try here.
Long term it seems I need the application fixed to always open and close the dataset - short term I can try some of the opther suggestions.
Thanks,
Steve. |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Wed Nov 04, 2009 2:55 am Post subject: |
|
|
Something that has not been mentioned yet is that RLSE will release any secondary extents, not the primary extent. Actually, I am wondering why this is even an issue for 5 cylinders??? |
|
Back to top |
|
 |
RonB Beginner
Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
|
Posted: Wed Nov 04, 2009 11:29 am Post subject: |
|
|
Actually, the RLSE parameter WILL release unused space in the primary extent. If the space was allocated in tracks/blocks/recs/bytes, unused tracks will be released; if the space was allocated in cylinders, unused cylinders will be released.
It should be noted, however, that RLSE will only release unused space on the FIRST volume of a multi-volume dataset. _________________ A computer once beat me at chess, but it was no match for me at kick boxing. |
|
Back to top |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Thu Nov 05, 2009 2:28 am Post subject: |
|
|
Thanks for the correction Ron. |
|
Back to top |
|
 |
|
|