Previous Topic Next topic Print topic


COBCH1702 The value of CONSTANT item <field1> involves circular definition

A circular definition has been created in the value of a CONSTANT.

You must change the VALUE clause so that it does not refer back to itself.

In the following example, all three fields in class a contain a circular definition.

class-id a.
01 n1 binary-long PUBLIC CONSTANT VALUE TYPE a::n2.    
01 n2 binary-long PUBLIC CONSTANT VALUE TYPE a::n1 + 1.
01 i1 binary-long PUBLIC CONSTANT VALUE TYPE b::i1.
method-id main STATIC.
 display n1
 display n2
end method.
end class.

class-id b.
01 i1 binary-long PUBLIC CONSTANT VALUE TYPE c::i1.
end class.

class-id c.
01 i1 binary-long PUBLIC CONSTANT VALUE TYPE a::i1.
end class.
Previous Topic Next topic Print topic