Announcement Announcement Module
Collapse
No announcement yet.
Pointer passing with external data structures Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pointer passing with external data structures

    Hello, I want to call a procedure with as parameter a pointer to an external data structure; In the called procedure I want to read the data of the external data structure by using the passed pointer, but it doesn't work. In the dump is the external data structure of the procedure not addressable. Has anybody an idea how to solve this ? Calling program D D PRDBKHDS E DS EXTNAME(PRDBKH) D D Ptr_PrdBkh S * Inz(%Addr(PRDBKHDS)) D C Callp T_PrdBkh(Ptr_PrdBkh) Called procedure P T_PrdBkh B Export D* D T_PrdBkh PI D P_PrdBkhPtr * Const D* DPRDBKHDS E DS EXTNAME(PRDBKH) D Based(P_PrdBkhPtr) C*

  • #2
    Pointer passing with external data structures

    Called procedure
     P T_PrdBkh B Export D* D T_PrdBkh PI D P_PrdBkhPtr * Const D* DPRDBKHDS E DS EXTNAME(PRDBKH) D Based(P_PrdBkhPtr) C*
    Eric, I'm doing much the same as what you're attempting, but I'm not having any trouble getting it to work. A difference between my working code and yours is that I base my data structure in the called procedure on a local pointer variable, and assign this local variable to the value of the pointer passed. I can vaguely recall difficulties arising whenever I based anything directly on the pointer that was passed.

    Comment

    Working...
    X