CodeGen Documentation
CodeGen Documentation

Loop Utility Expansion Tokens

 

Loop utility expansion tokens are tokens that are available for use inside any loop construct, and insert information based on the processing status of the current loop.

Loop Utility Token

Description

<,>

Inserts a comma UNLESS the final loop iteration is being processed, in which case inserts nothing.

<,AND>

<,and>

 

Inserts nothing if the final loop iteration is being performed. Inserts the text " AND " if the last but one iteration is being performed. Otherwise inserts a comma and a space. This token can be useful when producing documentation, as it allows you to generate text like "The primary colors are red, green and blue."

 

<,OR>

<,or>

 

Inserts nothing if the final loop iteration is being performed. Inserts the text " OR " if the last but one iteration is being performed. Otherwise inserts a comma and a space. This token can be useful when producing documentation, as it allows you to generate text like "Select a primary color red, green or blue."

 

<+>

Inserts a plus sign UNLESS the final loop iteration is being processed, in which case inserts nothing.

<:>

Inserts a colon UNLESS the final loop iteration is being processed, in which case inserts nothing.

<&&>

Inserts a logical AND operator (&&) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<.AND.>

Inserts a Synergy logical AND operator (.AND.) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<AND>

Inserts the word AND UNLESS the final loop iteration is being processed, in which case inserts nothing.

<|>

 

Inserts a pipe character (|) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<||>

Inserts a logical OR operator (||) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<.OR.>

Inserts a Synergy logical OR operator (.OR.) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<OR>

Inserts the word OR, UNLESS the final loop iteration is being processed, in which case inserts nothing.

<BSLASH>
 

Inserts a backward slash character (\) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<FSLASH>
 

Inserts a forward slash character (/) UNLESS the final loop iteration is being processed, in which case inserts nothing.

<PROCESSED_EXCLUSIVE>

 

Inserts the number of items already processed by the current loop EXCLUDING the current item. For example, if a loop with 10 items is being processed, and the 8th item is currently being processed, the value 7 will be inserted. This is because 7 items have already been processed before the current item.

 

<PROCESSED_INCLUSIVE>

Inserts the number of items already processed by the current loop INCLUDING the current item. For example, if a loop with 10 items is being processed, and the 8th item is currently being processed, the value 8 will be inserted. This is because the loop is currently processing the 8th item.

 

<REMAINING_EXCLUSIVE>

Inserts the number of remaining items to be processed by the current loop EXCLUDING the current item. For example, if a loop with 10 items is being processed, and the 8th item is currently being processed, the value 2 will be inserted. This is because there are 2 items still to be processed after the current item.

 

<REMAINING_EXCLUSIVE_MAX_n>

 

Similar to <REMAINING_EXCLUSIVE> except that if the number of items remaining is greater than n (a positive integer value) then the value of n will be inserted.

 

<REMAINING_INCLUSIVE>

Inserts the number of remaining items to be processed by the current loop INCLUDING the current item. For example, if a loop with 10 items is being processed, and the 8th item is currently being processed, the value 3 will be inserted. This is because there are 3 items still to be processed, including the current field.

 

<REMAINING_INCLUSIVE_MAX_n>

 

Similar to <REMAINING_INCLUSIVE> except that if the number of items remaining is greater than n (a positive integer value) then the value of n will be inserted.

 

<REPLICATION_REMAINING_EXCLUSIVE_MAX_n>

 

Intended for use specifically in the ISAM to SQL Replication environment, this token behaves like <REMAINING_EXCLUSIVE_MAX_n> except that the total number of items to be processed is reduced by the number of fields that contain the string REPLICATOR_EXCLUDE in fields user defined text or long description fields.

<REPLICATION_REMAINING_INCLUSIVE_MAX_n>

 

Intended for use specifically in the ISAM to SQL Replication environment, this token behaves like <REMAINING_INCLUSIVE_MAX_n> except that the total number of items to be processed is reduced by the number of fields that contain the string REPLICATOR_EXCLUDE in fields user defined text or long description fields.

<TOTAL_ITEMS>

 

Inserts the total number of items that will be processed by the current loop.

 

 

 


Copyright © 2021  Synergex International, Inc.