Mapping COBOL Records in C#

Hi, I'm trying to call a procedural COBOL program that is using a COBOL record, in C# the record is represented as String so how can I manipulate the record and be able to fill it and extract it as well. The procedural program is managed -not native-.

 

Regards

  • Verified Answer

    In the runtime services they is a type called MarshallUtils that allows you to marshall a struct to a byte[] and back, alternatively use the ILSMARTLINKAGE directive and this will generate extra types for any linkage section items...both are documented.

  • Thank you very much spgennard. I am gandalfing through the docs and it's amazing especially this part

    "Compiling with ILSMARTLINKAGE exposes the group item in the program as a new class, and the group items as properties of that class. Other managed languages do not recognize hyphenated data items but ILSMARTLINKAGE caters for that as well - it removes the hyphens from the names of the data items and changes the case to camel case. As a result, other managed languages will seeoperandsexposed as the classOperands, and the variablesop-1andop-2exposed as the propertiesOp1andOp2of that class. Similarly,func-codeis exposed asFuncCode."

    OMG! I feel like I'm in heaven! Micro Focus deserves the Turing Award for Visual COBOL and such a wonderful documentation.

    Best Regards