REL (Release)

Free-Form Syntax REL{(E)} program-device file-name
Code Factor 1 Factor 2 Result Field Indicators
REL (E) program-device file-name _ ER _

The REL operation releases the program device specified in program-device from the WORKSTN file specified in file-name.

Specify the program device name in the program-device operand. Use either a character field of length 10 or less, a character literal, or a named constant. Specify the file name in file-name operand.

To handle REL exceptions (file status codes greater than 1000), either the operation code extender 'E' or an error indicator ER can be specified, but not both. For more information on error handling, see File Exception/Errors.

When there are no program devices acquired to a WORKSTN file, the next READ-by-file-name or cycle-read gets an end-of-file condition. You must decide what the program does next. The REL operation may be used with a multiple device file or, for error recovery purpose, with a single device file.

Note:
To release a record lock, use the UNLOCK operation. See the UNLOCK operation for more information about releasing record locks for update disk files.

For more information, see File Operations.



[ Top of Page | Previous Page | Next Page | Contents | Index ]