<<

Contents

Search

>>

 

UNLOCK

 

 

Instruction

 

 

Syntax:

UNLOCK <Name of Index File> | ALL

 

<Name of Index File> = <INDEX FILE>

 

Meaning:

All locked records of an Index File are unlocked.

 

UNLOCK ALL unlocks all locked data records of all Index Files of the program.

 

Parameter:

Name of Index File

Name of Index File

 

Sample:

/* Lock all data records with CUSTOMER.CODE.NUMBER = 1

/* The 3. secondary key is CUSTOMER.CODE.NUMBER

 

NOUNLOCK CUSTOMER /* All read data records remain locked

CUSTOMER.CODE.NUMBER = 1

STARTS(3) CUSTOMER ON ERROR ... END

 

WHILE CUSTOMER.CODE.NUMBER = 1

DO  READS-NEXT(3) CUSTOMER ON ERROR ... END

ENDDO

/* All data records with CUSTOMER.CODE.NUMBER = 1 are now locked

... /* Process the locked data records

 

UNLOCK CUSTOMER /* Unlock all locked data records

 

See also:

NOUNLOCK

READLOCK

NOREADLOCK

HOLDLOCK

NOHOLDLOCK