CodeGen Documentation
CodeGen Documentation

Key Segment Loop Expansion Tokens

 

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

 

Key Segment Loop Token

Description

<SEGMENT_COMMA_NOT_
LAST_NORMAL_FIELD>

This token operates in a similar fashion to the <,> loop utility token, except that it has additional logic to suppress the output of the comma if all of the remaining segments are also used as tags within the structure. So in order for a comma to be output, at least one of the remaining subsequent segments must not be associated with a tag field.

 

<SEGMENT_CSTYPE>

 

Inserts C# data type of the field associated with the current key segment.

Possible values:  bool, byte, double, float, int, long, decimal, DateTime, Nullable<System.DateTime>, sbyte, short, string, uint, ulong, ushort

<SEGMENT_DESC>

 

Inserts the description of the field associated with the current key segment (if segment kind is field).

<SEGMENT_IDXTYPE>

 

Inserts the index type of the key segment.

Possible values:  ALPHA, CTIMESTAMP, DECIMAL, INTEGER, NOCASE, SEQUENCE, TIMESTAMP, UNSIGNED or UNSPECIFIED.

Alternates: <segment_idxtype>

<SEGMENT_KIND>

 

Inserts a numeric code for the kind of the current key segment.

Possible values: 

1          Field (see <SEGMENT_NAME> and <SEGMENT_MAPPEDNAME>)
2          Literal value (see <SEGMENT_LITVAL>)
3          External value (see <SEGMENT_STRUCTURE>)
4          Record number

<SEGMENT_LENGTH>

 

Inserts the length of the key segment.

<SEGMENT_LITVAL>

 

Inserts the literal value of the key segment (if segment kind is "literal").

<SEGMENT_MAPPEDNAME>

 

Inserts the name of the mapped field corresponding to the current key segment (if segment kind is field). 

 

Alternates:  <segment_mappedname> <Segment_Mappedname> <Segment_mappedname> <SegmentMappedname> <segmentMappedname>

<SEGMENT_NAME>

 

Inserts the name of the field associated with the current key segment (if segment kind is field). 

 

Alternates:  <segment_name> <Segment_Name> <Segment_name> <SegmentName> <segmentName>

<SEGMENT_NUMBER>

 

Inserts the one-based key segment number.

Possible values:  1 to 8

<SEGMENT_ORDER>

 

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

 

Possible values:  ASC, DESC

Alternates: <segment_order>

<SEGMENT_ORDER_CODE>

 

Inserts a one letter code indicating the ordering sequence of the current key segment, A or D.
 

Possible values:  A, D

Alternates: <segment_order_code>

<SEGMENT_POSITION>

 

Inserts the one-based position of the key segment in the record.

<SEGMENT_SEQUENCE>

 

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

 

Possible values:  ASCENDING, DESCENDING

Alternates: <segment_sequence>

<SEGMENT_SNTYPE>

 

Inserts Synergy.NET data type of the field associated with the current key segment.

 

Possible values:

byte, DateTime, decimal, double, float, int, long, @Nullable<DateTime>, short, String, System.SByte, System.UInt16, System.UInt32, System.UInt64

<SEGMENT_STRUCTURE>

 

Inserts the name of the structure containing the key segment (if the segment kind is "external").

 

Alternates:  <segment_structure> <Segment_Structure> <Segment_structure> <SegmentStructure> <segmentStructure>

<SEGMENT_SPEC>

 

Inserts Synergy data type and size of the field associated with the current key segment. For example:

 

Examples:

A15
D6
I4
D12.2

Alternates: <segment_spec>

<SEGMENT_TAG_VALUE>

 

If the field associated with the key segment is also associated with a tag then this token inserts that tag's comparison value.

<SEGMENT_TYPE>

 

Inserts a word which represents the index type of the current key segment.

 

Possible values: 

ALPHA                         Alpha (default)
INTEGER                       Integer
DECIMAL                       Decimal
UNSIGNED                       Unsigned integer
NOCASE                    Non case-sensitive alpha
SEQUENCE                 Auto sequence (ISAM Rev 6 or higher)
TIMESTAMP                Auto timestamp, last update time (ISAM Rev 6 or higher)
CTIMESTAMP           Auto timestamp, created time (ISAM Rev 6 or higher)
UNSPECIFIED
 

NOTE: The names refer to the KEY SEGMENT TYPE not the associated FIELD DATA TYPE!

Alternates: <segment_type>

<SEGMENT_VBTYPE>

 

Inserts VB data type of the field associated with the current key segment.

 

Possible values:

Boolean, Byte, DateTime, Decimal, Integer, Long, Nullable(Of System.DateTime), Short, String, System.Double, System.SByte, System.Single, System.UInt16, System.UInt32, System.UInt64

 

 


Copyright © 2021  Synergex International, Inc.