| **Navigation:**  [[introduction.htm|Language Reference]] > [[chapter runtime properties.htm|App C - PROP: Runtime Properties]] > Runtime VIEW and FILE Properties >====== PROP:CurrentKey ====== | [[prop connectstring.htm|{{btn_prev_n.gif|Previous page}}]][[chapter runtime properties.htm|{{btn_home_n.gif|Return to chapter overview}}]][[prop datapath.htm|{{btn_next_n.gif|Next 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**