The following example shows correct and an incorrect usage of the self:: syntax:
class-id myClass.
01 field-a string.
method-id myMethod.
set self to "Micro Focus" *> this is incorrect
set self::field-a to "Micro Focus" *> this is correct
end method.
end class.
Refer to Managed COBOL language reference for expected syntax.