- System administrator
- 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.
FREE [DATASET] name
Where: name is the name of the data set or template released.
The following example releases a data set and template that was previously allocated as
The ALLOCATE command in the following example allocates the data set
NAMEB with a data set name of
MY.DSN, and it 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
- 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=USERand 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. If the FREE command is not rejected but simply takes no action (for example, the file name is incorrect), you receive an explanatory message if your version of Model 204 is 7.7 or higher.
If a FREE command succeeds, you receive an explanatory message if your version of Model 204 is 7.7 or higher. For earlier versions, no message acknowledges a successful FREE.
- 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 Update units and transactions.