Topic
  • No replies
loani
loani
1 Post

Pinned topic Share data between COBOL and C

‏2012-05-13T14:32:21Z |
Hi,

I am trying to migrate an application written in COBOL and C to AIX using IBM COBOL version 3.1.
I noticed, that sharing data between COBOL module and C using the EXTERNAL clause does not work:
In cob_prog.cbl:
01 var1 pic 9(09) comp-5 is external;
In c_prog.c:
int var1;
The linker map them both to different memory locations,
My problem is that the application has a lot of this kind of data sharing between modules.
Is there any way (directive, switch etc.) to change behavior?
(using other compilers on other platforms, like HP-COBOL/DEC-COBOL or MF-COBOL it is working fine)

Thanks,

YF