Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
Hi there,
the LIKE= subparm is quite comfortable to allocate the result dataset similar to its source.
But i.e. when sorting the source using an include condition to filter most of the source rows there is lots of allocated space remaining that at the end is unused. And so I'ld like to release the space like I do when using i.e. SPACE=(TRK,(999,111),RLSE).
I tried some variants of SPACE=(,,RLSE) but was not successful.
Has anybody got a solution for my queston?
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
I suspect what you want to do is not possible unless you explicitly code the SPACE parameter in the job creating the new data set. From the JCL Reference manual (emphasis added by me):
Quote:
Use the LIKE parameter to specify the allocation attributes of a new data set by copying the attributes of a model data set, which must be an existing cataloged data set and reside on a direct access volume.
The following attributes are copied from the model data set to the new data set:
Data set organization
Record organization (RECORG) or
Record format (RECFM)
Record length (LRECL)
Key length (KEYLEN)
Key offset (KEYOFF)
Type, PDS, PDSE, basic format, extended format, large format, or HFS (DSNTYPE)
Space allocation (AVGREC and SPACE)
Unless you explicitly code the SPACE parameter for the new data set, the system determines the space to be allocated for the new data set by adding up the space allocated in the first three extents of the model data set. Therefore, the space allocated for the new data set will generally not match the space that was specified for the model data set. Note that regardless of the units in which the model data set was allocated, the new data set will be allocated in tracks. This assumes that space was not specified on the JCL and is being picked up from the model data set.
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
Sorry, maybe my question was a bit ambiguous:
I know I can 'overwrite' the space quantities taken from the referred source dataset by specifying i.e. SPACE=(TRK,(999,111),RLSE).
But I don't want to think about probable quantities of the results. The only thing I know is that the maximum quantity works.
This is why I'm asking for a someting like SPACE=(,,RLSE):
"Dear system, please start allocating the output dataset using the quantities given from the referred dataset and when finished successfully release the unused space..."
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
You could open a PMR with IBM to verify, but I don't think you can release the unused space when allocating with LIKE. The JCL Reference manual is clear about how LIKE allocates space, but says nothing about LIKE releasing unused space.
The CREATE step builds a data set, but it does not free unused space at the end of the data set. The RLSE step frees the unused space. It can be run as a step in a different job run after the job that created the data set.
In the SYSUT1 DD statement the DCB parameter specifies a data set that has the same DCB attributes as the data set you are freeing space. This ensures IEBGENER will not accidentally alter the DCB attributes of the data set specified by the SYSUT2 DD statement. The data set can be the same data set specified by the SYSUT2 DD statement.
In the SYSUT2 DD statement, DISP=MOD directs data management to add additional data to the end of the data set.
You may be able to code an appropriate Management Class (MGMTCLAS) in your JCL that will force release of the unused space. You'll need to ask your Storage Admin people if there is such a Mgmtclas available and if it will be accepted and not overridden by the SMS ACS routines. You want one that provide YES_IMMED or COND_IMMED.
Mgmtclas Release can occur in different ways:
YES Release unused space automatically during the
Space Management cycle.
CONDITIONAL Unused space can be released automatically only
if a secondary allocation exists for the data set.
YES IMMED Release unused space when a data set is closed or during
the Space Management cycle, whichever comes first.
COND IMMED Unused space for data sets with secondary allocation is
released either when a data set is closed or during the
Space Management cycle, whichever comes first.