call cobol from pl/i using pointers

From: Piero Crincoli (piero.crincoli_at_infoconsulting.it)
Date: 07/29/04


Date: 29 Jul 2004 02:31:18 -0700

I have to write a cobol routine called from pl/i.

In pl/i I have:

pointer1=addr(area1)
pointer2=addr(area2)
call routine(pointer1, pointer2, variable1, variable2).

What about cobol program? Is the following correct?

linkage section.
  01 pointer1
  01 area1
  01 pointer2
  01 area2
  01 variable1
  01 variable2

procedure division using pointer1, pointer2, variable1, variable2.
  set address of area1 to pointer1
  set address of area2 to pointer2
  ...

thanks piero