Skip to main content

Mixed Language calling a DLL written in C - problem accessing data defined in C

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

Release: 3.1   You must pass a pointer to the data item to COBOL and establish addressibility within the linkage section.

Resolution:

Linkage section.

01  some-string    pic x(256).

procedure division.

    call "some_func" using by value int-param

                              returning address of some-string

    end-call

Then in your C program return a pointer to the array

Attachments:

DB2_description.JPG

Old KB# 6858