RTVJOBSTK memcpy() incorrect length in 3rd parm
Brought to you by:
dmmorris
In Srvpgm JOBTKT, sub-procedure RTVJOBSTK the statement
CALLP MemCpy(%ADDR(QWVK0100)
:pRtnStk:RtnStkSiz)
causes a pointer reference error on pass #2. The value in RtnStkSiz is typically larger that the size of the DS QWVK0100. The work around is below.
CALLP MemCpy(%ADDR(QWVK0100)
:pRtnStk:%Len(QWVK0100))
This works because we are only interested in the fields that have offset and length information and not the actuall stack entry information in this sub-procedure. The stack entry data is still in tack becase pRtnStk has not been repositioned.