FREE command: Difference between revisions
Line 23: | Line 23: | ||
==Usage notes== | ==Usage notes== | ||
<p>Only User 0 can free data sets with the prefix CCA. All other data sets can be freed by the system administrator. An ordinary user can release only data sets allocated with SCOPE=USER and allowed by the <var class="product">Model 204</var> ALOCPRIV parameter.</p> | <p>Only User 0 can free data sets with the prefix CCA. All other data sets can be freed by the system administrator. An ordinary user can release only data sets allocated with SCOPE=USER and allowed by the <var class="product">Model 204</var> ALOCPRIV parameter.</p> | ||
<p>A data set can be allocated through the forms of the ALLOCATE command, the <var class="product">Model 204</var> startup Job Control Language, or the EXEC statement. (Refer to [[ALLOCATE command | <p>A data set can be allocated through the forms of the ALLOCATE command, the <var class="product">Model 204</var> startup Job Control Language, or the EXEC statement. (Refer to [[ALLOCATE command]] for more information on allocation.) </p> | ||
<p>If you release an ALLOCATE command-created data set and its template, you cannot refer to the template with the LIKE phrase of an ALLOCATE or DEFINE DATASET command until the data set is redefined by issuing ALLOCATE or DEFINE DATASET. You can refer to the released template with LIKE, however, if the data set and template are first created with DEFINE DATASET.</p> | <p>If you release an ALLOCATE command-created data set and its template, you cannot refer to the template with the LIKE phrase of an ALLOCATE or DEFINE DATASET command until the data set is redefined by issuing ALLOCATE or DEFINE DATASET. You can refer to the released template with LIKE, however, if the data set and template are first created with DEFINE DATASET.</p> | ||
<p>The FREE command can also be used with a temporary in-memory file. Issuing FREE releases the above-the-bar storage that was allocated for the file and makes the file unavailable. If you know that you will need the in-memory file in the future, then dump the file before you free it. To see how much storage an in-memory file is consuming, issue the [[MONITOR GSTORAGE command|MONITOR GSTORAGE (or MONITOR GS)]] command. The memory object and file pages are not freed if the file is physically closed. | <p>The FREE command can also be used with a temporary in-memory file. Issuing FREE releases the above-the-bar storage that was allocated for the file and makes the file unavailable. If you know that you will need the in-memory file in the future, then dump the file before you free it. To see how much storage an in-memory file is consuming, issue the [[MONITOR GSTORAGE command|MONITOR GSTORAGE (or MONITOR GS)]] command. The memory object and file pages are not freed if the file is physically closed. | ||
For more information about creating temporary in-memory files, see [[ALLOCATE command | For more information about creating temporary in-memory files, see [[ALLOCATE command]].</p> | ||
<p>If a FREE command is rejected, <var class="product">Model 204</var> displays an error message explaining why the command was not accepted. You cannot release a data set that is currently in use. </p> | <p>If a FREE command is rejected, <var class="product">Model 204</var> displays an error message explaining why the command was not accepted. You cannot release a data set that is currently in use. </p> | ||
<p>When a file is opened in deferred update mode, <var class="product">Model 204</var> protects the file by making it impossible to free the file in that <var class="product">Model 204</var> run until all updates have been applied. All files are closed completely at the end of the <var class="product">Model 204</var> run.</p> | <p>When a file is opened in deferred update mode, <var class="product">Model 204</var> protects the file by making it impossible to free the file in that <var class="product">Model 204</var> run until all updates have been applied. All files are closed completely at the end of the <var class="product">Model 204</var> run.</p> | ||
<p>When it processes FREE, <var class="product">Model 204</var> ends any update unit in progress and begins a non-back outable update unit. For more information about <var class="product">Model 204</var> update units, see the <var class="book">Model 204 File Manager's Guide</var>.</p> | <p>When it processes FREE, <var class="product">Model 204</var> ends any update unit in progress and begins a non-back outable update unit. For more information about <var class="product">Model 204</var> update units, see the <var class="book">Rocket Model 204 File Manager's Guide</var>.</p> | ||
[[Category: System administrator commands]] | [[Category: System administrator commands]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Revision as of 16:31, 28 June 2013
Summary
- Privileges
- System administrator
- Function
- Releases a data set, and its set of attributes (template), that was allocated by the ALLOCATE command or by specifying the data set in the JCL used to start up Model 204.
Syntax
FREE [DATASET] name
Where: name is the name of the data set or template released.
Example 1
The following example releases a data set and template that was previously allocated as NAMEA:
FREE NAMEA
Example 2
The ALLOCATE command in the following example allocates the data set NAMEB with a data set name of MY.DSN, and copies the attributes of the NAMEA template to the NAMEB data set. The FREE command releases the NAMEB data set and template:
ALLOCATE NAMEB LIKE NAMEA WITH DSN=MY.DSN FREE NAMEB
Usage notes
Only User 0 can free data sets with the prefix CCA. All other data sets can be freed by the system administrator. An ordinary user can release only data sets allocated with SCOPE=USER and allowed by the Model 204 ALOCPRIV parameter.
A data set can be allocated through the forms of the ALLOCATE command, the Model 204 startup Job Control Language, or the EXEC statement. (Refer to ALLOCATE command for more information on allocation.)
If you release an ALLOCATE command-created data set and its template, you cannot refer to the template with the LIKE phrase of an ALLOCATE or DEFINE DATASET command until the data set is redefined by issuing ALLOCATE or DEFINE DATASET. You can refer to the released template with LIKE, however, if the data set and template are first created with DEFINE DATASET.
The FREE command can also be used with a temporary in-memory file. Issuing FREE releases the above-the-bar storage that was allocated for the file and makes the file unavailable. If you know that you will need the in-memory file in the future, then dump the file before you free it. To see how much storage an in-memory file is consuming, issue the MONITOR GSTORAGE (or MONITOR GS) command. The memory object and file pages are not freed if the file is physically closed. For more information about creating temporary in-memory files, see ALLOCATE command.
If a FREE command is rejected, Model 204 displays an error message explaining why the command was not accepted. You cannot release a data set that is currently in use.
When a file is opened in deferred update mode, Model 204 protects the file by making it impossible to free the file in that Model 204 run until all updates have been applied. All files are closed completely at the end of the Model 204 run.
When it processes FREE, Model 204 ends any update unit in progress and begins a non-back outable update unit. For more information about Model 204 update units, see the Rocket Model 204 File Manager's Guide.