rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hi Akshatha
A COBOL pointer is like a void pointer in C: it can point to any kind of object. Pointers are mainly useful for stitching together various data objects to form a data structure. Typically, data structures are built from dynamically allocated memory.
Declare a pointer as an elementary data item bearing the USAGE IS POINTER clause, with no PICTURE. E.g:
05 EXAMPLE-P USAGE IS POINTER.
EXAMPLE-P is a four-byte field which can store the address of any data item. Unless you're interfacing COBOL to Assembler or something, you really don't care what the pointer looks like internally. |
|