Dealing with Pointers in Cobol
In Micro Focus COBOL, you can only use the ADDRESS OF operator to obtain the address of a data item in the LINKAGE SECTION. Pointers to items must be passed from other programs. To get around this limitation, a sub-program may be written to which an empty pointer and a data item is passed. Since the pointer is in the called program's linkage section, the called program can set the pointer for the calling program.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![]() |