I am able to access COBOL copybook variables from C# using the ilsmartlinkage compiler directive as long as there is only one cbl in the referenced project. However, if I add an additional cbl to the referenced project I get a compiler error and have to add an additional compiler directive of ilsmartnest to get it to compile without error. Once I do that I cannot get access to the copybook variables from C#. What am I doing wrong or what do I need to do additionally?
Below is my sample code:
static void Main(string args)
CobolModule01 clientRecLinkage = new CobolModule01();
ClientRecord clientRec = new ClientRecord();
clientRec.ClientId = "123456789";
Assume that I have a Visual COBOL solution with two modules, CobolModule01 and CobolModule02. Also that my copybook contains a 01 level ClientRecord definition with a 05 level ClientId data item.