MCH3601 is ?Pointer not set for location referenced.? I have a Sub-Procedure that I want to feed an address. Then have the Sub-Procedure change the values at that memory location, pointed to by the address. Then end. This will change the values for the calling program since the memory is allocated in the calling program. The reason I don?t use parameters is that this is a utility type Service Program, and all I want to have to modify is the Data-Structure InnerListStrut in the calling program, and not create a Service Program for every possible Data-Structure, there could be 100+. Here is a snippet of the code. Calling program??
D ptr S * D InnerListStrut DS D GroupName 10A D GroupValue 30A D ValueInHex 1A C EVAL ptr = %ADDR(InnerListStrut) C CALLP pGetNextILVal(ptr) /
P pGetNextILVal B EXPORT D pGetNextILVal PI * Receiving Pointer D ReceiveingP * VALUE * Char string for debuging. D ReceiverChar S 32767A BASED(ptr) D Work2Char S 2A D Start S 5S 0 C EVAL Start = pGetOffSet(1) + g_MDILBECFL + 1 C EVAL ptr = ReceiveingP C EVAL ReceiverChar = %SubSt(g_LWLString: C Start: C g_InnerListsL) P pGetNextILVal E /
Every time a run the program I get the MCH3601 error when the Sub-Procedure returns. Why on the return? The Sub-Procedure does not have a return parameter defined. The Sub-Procedure has already changed the value in memory, I can see it in debug.