COBCH1860 LENGTH OF はサポートされない - 1 次元のマネージ配列、文字列またはコレクションには SIZE OF を使う必要がある

LENGTH OF 演算子は、オブジェクト型では使用できません。

解決方法:

コードを修正してから再コンパイルします。マネージ配列、文字列、またはコレクション オブジェクトの論理サイズを取得する場合は、SIZE OF を使用します。

例:

次の例は、示されているとおりに、LENGTH OF の代わりに SIZE OF を使用する必要がある場所を示しています。

           declare array1 = table of ("AAA" "BB" "C")
           display length of array1                         *> Error
           display size of array1                           *> ok
           declare s1 as string = "Hello"
           display length of s1                             *> Error
           display size of s1                               *> ok
           declare dict1 as dictionary[string, string]
           create dict1
           write dict1 from "X" key "X"
           write dict1 from "Y" key "Y"
           display length of dict1                          *> Error
           display size of dict1                            *> ok
           declare o1 as object
           display length of o1                             *> Error
           display size of o1                               *> Error, not a suitable type