DF_INDEX_SEGMENT_CASE
See Also: Get_Attribute, Set_Attribute
The case sensitivity of the index segment.
Level
Index segment
Supported by
All Drivers
Type
Enumeration list, permanent
Access
Read / Write
Values
DF_CASE_USEDDF_CASE_IGNORED
Remarks
DF_CASE_IGNORED makes an index segment case insensitive. DF_CASE_USED makes an index segment case sensitive. Case insensitive segments are of special value where material such as names may contain variations in capitalization. In indexes containing case insensitive segments, capitalization in the column used for that segment does not affect the sequencing of records.
This attribute can only be set inside a Structure_Start ... Structure_End operation. The value of this attribute may be stored in the intermediate file under the keyword Index_Segment_Case.
Procedure ShowIndices Handle hTable
Integer iLastIndex iIndex iNumSegments iSegment iColumn iCase iDirection
String sColumn sIndex
Get_Attribute DF_FILE_LAST_INDEX_NUMBER Of hTable To iLastIndex
For iIndex From 1 To iLastIndex
Get_Attribute DF_INDEX_NUMBER_SEGMENTS Of hTable iIndex To iNumSegments
If (iNumSegments > 0) Begin
Move "" To sIndex
For iSegment From 1 To iNumSegments
Get_Attribute DF_INDEX_SEGMENT_FIELD Of hTable iIndex iSegment To iColumn
Get_Attribute DF_FIELD_NAME Of hTable iColumn To sColumn
Get_Attribute DF_INDEX_SEGMENT_CASE Of hTable iIndex iSegment To iCase
If (iCase = DF_CASE_IGNORED) ;
Move (sColumn * "uppercased") To sColumn
Get_Attribute DF_INDEX_SEGMENT_DIRECTION Of hTable iIndex iSegment To iDirection
If (iDirection = DF_DESCENDING) ;
Move (sColumn * "descending") To sColumn
If (iSegment > 1) ;
Move (sIndex + ",") To sIndex
Move (sIndex * sColumn) To sIndex
Loop
Showln " Index number: " iIndex " (" sIndex ")"
End
Loop
If (iLastIndex = 0) ;
Showln " NO index defined."
End_Procedure
The sample procedure above shows all segments of all indices of a table. If a segment is “uppercased” and/or descending, this is added to the segment description.