NETDEFGEN Enumerators

If the .NET assembly has enumerators, the NETDEFGEN COPY file lists them all and makes them accessible to the COBOL program. For example, the COPY file might list:

* "int animals_horses"
          ENUMERATOR, @animals_horses,  1

If the COPY file lists enumerators, you can use the enumerators in your COBOL program to set properties or invoke methods. This allows you to use a text name in place of a value, enhancing the readability of your program. The compiler checks the COPY file and substitutes the value associated with the name. For example, to set a property to the enumerator shown above, you could code:

MODIFY MyHandle  myPet = @animals_horses.

rather than

MODIFY MyHandle  myPet = 1.