On Tue, 16 Dec 2025 16:39:28 GMT, [email protected] <[email protected]> wrote:
> I always grt a RC=10 from the LMCOPY
Use TRACE I to see the executed statements and RC from each statement which
will make the error obvious.
> "ALLOC F("outdd") DA('"WORKDSN"') SHR REUSE"
These quotes make outdd a REXX variable. If it's not set, then it translates to
OUTDD. I think you always want this to be OUTDD, so I recommend removing the
quotes so it is guaranteed to be OUTDD.
I suggest you look at similar quoting and correct it.
> "LMINIT DATAID("outdd") DATASET("WORKDSN") ENQ(SHR)"
Notice that WORKDSN is not quoted here but it's quoted in the ALLOC above. You
are most likely getting a non-zero RC for this statement because it's appending
your TSO PREFIX. Error messages are not always displayed.
For LMINIT, the DATAID is a variable name (not variable value). Remove quoting
around outdd because if REXX variable outdd is set, then the variable name
would not be OUTDD.
Since you specified DSN on LMINIT, the ALLOC above does not serve any purpose.
LMINIT internally does an allocate for a DD name that is returned in the DATAID
variable.
> "LMCOPY FROMID("indd") TODATAID("outdd") ",
I believe this is correct but check the manual. I think only LMINIT DATAID
specifies a variable name and all other LM commands must substitute the REXX
variable value.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN