length_struct_map
The length_struct_map function yields the number of elements contained in FIELDSET MAP.
length_struct_map (MAP_to_be_counted)
The function returns NUMBER that is the number of elements stored in the map.
This function has one parameter:
- MAP_to_be_counted, MAP of type FIELDSET. A MAP with the number of elements to be counted.
An example is provided here.
DATASTRUCTURE EL
BEGIN
TEXT Field
END
DATASTRUCTURE DS
BEGIN
MAP EL Test_map
END
DECLARE struct DEFINED_AS DS
ASSIGN struct.Test_map ["first"].Field := "TRUE"
ASSIGN struct.Test_map ["second"].Field := "FALSE"
ASSIGN struct.Test_map ["third"].Field := "TRUE"
ASSIGN struct.Test_map ["fourth"].Field := "TRUE"
ASSIGN struct.Test_map ["fifth"].Field := "FALSE"
NUMBER length_function_result
ASSIGN length_function_result := length_struct_map (struct.Test_map)
#
@(length_function_result)
#
When you refer to a MAP element, it results in the creation of that element. The element is created empty.