Complex pointer operations
For pointers with multiple levels of indirection, dereferencing
operations can be complicated. The COBOL code to perform such dereferencing
operations would require multiple 77-level items with a SET
operation
for each level of indirection. To complicate matters, dynamically
allocated structures are difficult to access without knowing an absolute
maximum size for the structure.
Instead of attempting complex pointer operations in COBOL, it is highly recommended that code of this nature be implemented in a modular fashion by using the COBOL-to-C source. Currently functions are implemented for memory allocation and contents buffer data insertion and retrieval. You may find it helpful to add to this code as necessary and use it for more complex operations.