Menu

#19 RTVJOBSTK memcpy() incorrect length in 3rd parm

open
nobody
None
5
2007-12-06
2007-12-06
Matt Tyler
No

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.

Discussion


Log in to post a comment.