cobol SET statement SET pointer example


Example

SET handle TO returned-pointer
SET handle UP BY LENGTH(returned-pointer)
SET ADDRESS OF buffer-space TO handle
MOVE buffer-space TO work-store
DISPLAY "Second element is " work-store