+ Reply to Thread
Results 1 to 2 of 2

Thread: Pointer passing with external data structures

  1. #1
    Guest.Visitor Guest

    Default 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. #2
    Guest.Visitor Guest

    Default 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.

+ Reply to Thread

Similar Threads

  1. CL Data Structures
    By DougCMH in forum CL
    Replies: 1
    Last Post: 03-23-2007, 10:25 PM
  2. XML and RPG Data Structures
    By coteijgeler@chello.nl in forum RPG
    Replies: 4
    Last Post: 04-07-2003, 07:40 PM
  3. Replies: 1
    Last Post: 01-03-2003, 05:04 AM
  4. Passing data structures to a subprocedure
    By Guest.Visitor in forum Programming
    Replies: 23
    Last Post: 06-28-2000, 05:22 PM
  5. Passing a pointer to an integer from RPG
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 05-15-1998, 09:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts