Free STATEMENT

PURPOSE:  The FREE statement releases all records in one or more DS's that were previously reserved or locked by the user.

General Form

FREE [designator] ALL /RECORDS/

where:

designator is the name of the DS containing the reserved or locked records.  If a designator is specified, the FREE statement frees all records in that DS.  If no designator is specified, the FREE statement frees all records that have been reserved or locked by this PM.

Reserved records are automatically freed when a record from another block is reserved or locked, unless the MULTIPLE option is used in the GET statement.  In the latter case, a FREE statement must be used to free the reserved records so that other concurrent users may access them.

Likewise, records locked by the GET LOCKED statement are freed when a record from another block is locked, unless the MULTIPLE option is used.  In this case, the FREE statement must be used to free the LOCKED records so that concurrent users may access them.

Refer to the GET statement for more information.

All records are automatically freed when the PM is terminated.

The FREE statement is only valid when the PM is executed under the Concurrent Queued environment;  otherwise, the FREE statement results in an error condition, and @AUX is set to “LOCK”.