Oy. Look at how that formatted--can you try again?
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
[email protected]
Sent: Tuesday, December 16, 2025 11:39 AM
To: [email protected]
Subject: Need Help using LMCOPY in a Rexx program
Hello.Im not well versed in Rexx -I have cobbled some code together to
copy/replace a member of a LIBRARY to ANother Library -.However I always grt a
RC=10 from the LMCOPY the indsn is defined as a library with RECFM=80the outdsn
is also defined as a library with RECFM=80Both use a different Blocksize -.To
allocate the outdsn i coded the following:ADDRESS TSO IF SYSDSN("'"WORKDSN"'")
= 'OK' THEN DO "ALLOC F("outdd") DA('"WORKDSN"') SHR REUSE"
END
ELSE
DO
"ALLOC F("outdd") DA("||"'"||WORKDSN||"'",
||") NEW SPACE (01,01) TRACK LRECL(080) RECFM(F) ", ||" DSNTYPE(LIBRARY)
DIR(3)"
||" BLKSIZE(80)"
END ..the indsn previously existed -.I can see both datasets in TSO 3.4.When I
issue the LMCOPY statement, I Always get a RC=10Meaning: No data set is
associated with the given data ID. -address ispexec "LMINIT DATAID("indd")
DATASET("indsn") ENQ(SHR)"
"LMINIT DATAID("outdd") DATASET("WORKDSN") ENQ(SHR)"
"LMCOPY FROMID("indd") FROMMEM("REPLS2WS") TODATAID("outdd") ",
"TOMEM("REPLS2WS") "REPLACE
lastcc = rc /* get retunr code from LMCOPY */ if lastcc = 0 then nop else say
'rc from LMCOPY='lastcc Say 'Copy Failed'
"LMFREE DATAID("outdd")"
exit..I suspect there is another Reason for RC 10 beacuse I can see in TSO 3.4
both datasets ?.Any suggestions ?paul...
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN