User Tools

Site Tools


prop_currentkey.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Runtime VIEW and FILE Properties >====== PROP:CurrentKey ====== Previous pageReturn to chapter overviewNext page

Property of a FILE that returns a reference to the current KEY or INDEX being used for sequential processing, or the current key being built during a BUILD or PACK operation (READ ONLY). Valid only as the source side of a reference assignment statement or in a logical expression comparing the return result to NULL. Returns NULL if the file is being processed in record order.

Example:

KeyRef &KEY

Customer FILE,DRIVER('Clarion'), PRE(Cus)

NameKey  KEY(Cus:Name),DUP

Record   RECORD

Name     STRING(20)

    . .

CODE

OPEN(Customer)

SET(Customer)

KeyRef &= Customer{PROP:CurrentKey)   !Returns NULL

IF Customer{PROP:CurrentKey) &= NULL   !Compare to NULL

 MESSAGE('SET to record order')

END

SET(Cus:NameKey)

KeyRef &= Customer{PROP:CurrentKey)   !Returns reference to Cus:NameKey

prop_currentkey.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1