I have run LMDLIST many times and this invocation appears to be identical to others that work successfully!
Here's the code snippet.
SAY "PTN="ptn
ADDRESS ISPEXEC "LMDINIT LISTID(LI) LEVEL("ptn") "
SAY "RC="RC zerrsm;SAY STRIP(zerrlm)
SAY "LISTID="li
ADDRESS ISPEXEC "LMDLIST LISTID("li") "
PARSE VALUE zerrsm";"STRIP(zerrlm) WITH sm ";" lm
SAY "RC="RC zerrsm;SAY STRIP(zerrlm)
SAY C2X(WORD(zerrlm,WORDS(zerrlm)))
ADDRESS ISPEXEC "LMDFREE LISTID("li")"
ADDRESS ISPEXEC "LMDINIT LISTID(LI) LEVEL("ptn") "
SAY "RC="RC zerrsm;SAY STRIP(zerrlm)
SAY "LISTID="li
ADDRESS ISPEXEC "LMDLIST LISTID("li") "
PARSE VALUE zerrsm";"STRIP(zerrlm) WITH sm ";" lm
SAY "RC="RC zerrsm;SAY STRIP(zerrlm)
SAY C2X(WORD(zerrlm,WORDS(zerrlm)))
ADDRESS ISPEXEC "LMDFREE LISTID("li")"
Which gives this error...
PTN=N472730.DJCK.J%%
598 *-* ADDRESS ISPEXEC "LMDINIT LISTID(LI) LEVEL("ptn") "
>>> "LMDINIT LISTID(LI) LEVEL(N472730.DJCK.J%%) "
RC=0
LISTID=ISR00003
601 *-* ADDRESS ISPEXEC "LMDLIST LISTID("li") "
>>> "LMDLIST LISTID(ISR00003) "
RC=0 Variable exit error
Exit routine at 88B99878 gave error code 20 for FIND of :::::::
FF08B9BBEE08B9
606 *-* ADDRESS ISPEXEC "LMDFREE LISTID("li")"
>>> "LMDFREE LISTID(ISR00003)"
598 *-* ADDRESS ISPEXEC "LMDINIT LISTID(LI) LEVEL("ptn") "
>>> "LMDINIT LISTID(LI) LEVEL(N472730.DJCK.J%%) "
RC=0
LISTID=ISR00003
601 *-* ADDRESS ISPEXEC "LMDLIST LISTID("li") "
>>> "LMDLIST LISTID(ISR00003) "
RC=0 Variable exit error
Exit routine at 88B99878 gave error code 20 for FIND of :::::::
FF08B9BBEE08B9
606 *-* ADDRESS ISPEXEC "LMDFREE LISTID("li")"
>>> "LMDFREE LISTID(ISR00003)"