CodeGen Documentation
CodeGen Documentation

Key Loop Expansion Tokens

 

Key loop expansion tokens are used to insert information about the current key being processed within the context of a key loop into the output stream. Key loop tokens can only be used inside a key loop.

 

Key Loop Token

Description

<KEY_CHANGES>

 

Inserts text indicating whether the key allows changes to existing key entries.

Possible values:  CHANGES, NOCHANGES

<KEY_DENSITY>

 

Inserts the key packing density for the current key.

Possible values: 50 to 100

<KEY_DESCRIPTION>

 

Inserts the description of the key. Be aware that key descriptions are optional in Repository, so this token may expand to nothing!

<KEY_DUPLICATES>

 

Inserts text indicating whether the key allows duplicate values.

Possible values:  DUPLICATES, UNIQUE

<KEY_DUPLICATES_AT>

 

Inserts text indicating where duplicate values are inserted.

Possible values:  FRONT, END

<KEY_ISAMC_SPEC>

 

Inserts an ISAMC key specification string for the key currently being processed.

 

Example output:  START=1,LENGTH=6,NAME=EMP_ID,TYPE=ALPHA,ASCEND,DENSITY=50,DUPS,NOATEND,NOMODIFY

See also:  <FILE_ISAMC_SPEC>

<KEY_LENGTH>

 

Inserts the length of the key. The length of the key is the sum of the length of all key segments.

<KEY_NAME>

 

Inserts the name of the key. Note that this is the name of the key in the repository, and may or may not correspond to the name of the key in the underlying ISAM file, if a key name exists.

 

Alternates:  <key_name> <Key_Name> <Key_name> <KeyName> <keyName>

IMPORTANT: Please note that ISAM key names are CASE SENSITIVE in the Synergy runtime and can only be stored in UPPERCASE in the repository. As a result, depending on the name of the key in the actual data file, it may not be possible to generate an exact match for that key using this token.

<KEY_NULLTYPE>

 

Inserts the keys null key type.  The token should only be used within a <IF NULLKEY> expression.

 

Possible values:  NONE, REPLICATE, NOREPLICATE, SHORT

Alternates: <key_nulltype>

<KEY_NULLVALUE>

 

Inserts the keys null key value.  The token should only be used within an <IF NULLKEY> expression.

<KEY_NUMBER>

 

Inserts the number of the key, primary key is key 0, first alternate key is key 1, and so on.

 

Possible values: 0 to 1023

<KEY_ORDER>

 

Inserts the ordering sequence of the key, ascending or descending.

 

Possible values:  ASCENDING, DESCENDING

<KEY_SEGMENTS>

 

Inserts the number of key segments defined.

 

Possible values:  1 to 8

<KEY_UNIQUE>

 

If the key does not allow duplicates then inserts the text UNIQUE, otherwise nothing is inserted.

 

 


Copyright © 2021  Synergex International, Inc.