Hello,
Hopefully one of you guys could help with a problem that has seen us banging our heads
against the wall now for a number of days.
We are calling a C function (in a DLL) from COBOL returning a pointer as follows:
CALL 'cfunction1' RETURNING C-POINTER.
Stepping through using the z/OS Debug tool v8.1 we can see the pointer being set within
the C function and when control returns to the COBOL program the COBOL pointer contains
the same value.
We then call a second C function as follows:
CALL 'cfunction2' USING BY VALUE C-POINTER
BY REFERENCE C-GROUP
RETURNING C-STATUS.
The parameters are defind in COBOL as:
01 C-POINTER USAGE IS POINTER.
01 C-GROUP PIC X(28)
01 C-STATUS PIC XX.
C-GROUP is filled with low-values prior to the call to cfunction2.
Again through debug, upon entry to cfunction2 the value of C-POINTER has changed
and we can't see any reason why this would be the case? Any ideas? What are we
missing?
We're running on z/OS v1.9, Enterprise COBOL v4. Any help would be much
appreciated.