Skip to main content

Data Type Conversion

  • March 26, 2015
  • 1 reply
  • 0 views

I am looking for specific examples of how, in a Managed COBOL program/class, how to convert back and forth between traditional COBOL data types (such as COMP-3, COMP-5, COMP-X ) to equivalent Net types, and vice-versa.  For example, the data file being processed in the Managed COBOL program has some of these traditional COBOL data types - I need to see how to convert them, both to and from Managed types - specific examples.

Thanks

1 reply

Lanter Werner
  • Participating Frequently
  • March 27, 2015

I am looking for specific examples of how, in a Managed COBOL program/class, how to convert back and forth between traditional COBOL data types (such as COMP-3, COMP-5, COMP-X ) to equivalent Net types, and vice-versa.  For example, the data file being processed in the Managed COBOL program has some of these traditional COBOL data types - I need to see how to convert them, both to and from Managed types - specific examples.

Thanks

Hi

You can simply use the Cobol Statement SET. See also in Help for implicit conversion and Compatible Types Example in .NET COBOL Interoperation.

Regards

Werner Lanter