OpenCOBOL Forum Index OpenCOBOL
Issue between declared variables in linkage section in callee sub and "real" variables in caller sub | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| eraso | Posted on: 2012/2/27 17:06 |
Not too shy to talk ![]() ![]() Joined: 2006/11/22 From: SUTEC - Fontenay sous Bois (France) Posts: 21 |
Issue between declared variables in linkage section in callee sub and "real" variables in caller sub Hello,
I have encountered the code below in the application I'm migrating : PROGRAM PRG1 SUB PRG2 As you can read the programs above : - the caller sub declares a variable of 2000 bytes - the callee sub declares the same variable of 16000 bytes through the linkage section and a working variable of the same length The only action made is to copy the value from caller variable to callee variable : The translation in C language for the line is that is syntactically correct but the real length of b_7 is 2000 not 16000 so an exception is risen "Attempt to reference unallocated memory (Signal SIGSEGV)" (OC 1.1) / "Memory Fault" (OC 0.33) I understand that this issue (maybe someone has already written a post about this problem but I haven't found any) is due to the asset i'm working on but could the problem and the solution may lie between using the cob_module structure and the cob_move function, as when the move action between two variables of different lengths is done by the cob_move function ? KR, eraso |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| » |
eraso | 2012/2/27 17:06 |
| |
btiffin | 2012/2/27 21:25 |
| |
eraso | 2012/2/28 10:42 |
| |
human | 2012/2/28 11:45 |
| |
eraso | 2012/2/28 13:55 |
| Register To Post | |






