DEQ command

The Dequeue (DEQ) command is used to release a segment that is retrieved with the LOCKCLASS option.

Format

Read syntax diagramSkip visual syntax diagramEXEC DLIDEQLOCKCLASS( data_value)

Option

LOCKCLASS(data_value)
Specifies that you want to release the lock that is being held as the result of an earlier GU, GN, or GNP command that had a LOCKCLASS option with the same data_value. Data_value must be a 1-byte alphabetic character in the range of B to J.

For full function, specify the LOCKCLASS option followed by the lock class of that segment (for example, LOCKCLASS('B')). If the option is not followed by a letter (B-J), EXECDLI sets a status code of GL and initiates an ABENDU1041.

DEQ commands are not supported for Fast Path.

Usage

Use the DEQ command to release locks on segments that were retrieved using the LOCKCLASS option. Using LOCKCLASS on Get commands allows you to reserve segments for exclusive use by your transaction. No other transaction is allowed to update these reserved segments until either your transaction reaches a sync point or the DEQ command has been issued, thereby releasing the locks on these reserved segments. The LOCKCLASS option lets your application program leave these segments and retrieve them later without any changes having been added.

Example

Your program can use the LOCKCLASS option as follows:
EXEC DLI DEQ LOCKCLASS(data_value)
EXEC DLI GU SEGMENT(PARTX)
       SEGMENT(ITEM1) LOCKCLASS('B') INTO(PTAREA1);
EXEC DLI GU SEGMENT(PARTX)
       SEGMENT(ITEM2) LOCKCLASS('C') INTO(PTAREA2);
EXEC DLI DEQ LOCKCLASS('B');
Explanation

This example shows the format of the DEQ command, where data_value is a 1-byte alphabetic character in the range B to J. The DEQ command releases the lock that was gotten and held with a LOCKCLASS of 'B' for the PARTX segment as a result of the first GU. The lock that was gotten with a LOCKCLASS of 'C' on the PARTX segment during the second GU remains held.

Restriction

Restrictions for the DEQ command:

  • To use this command you must first define an I/O PCB for your program.