Clarification on LMCOPY
Posted: Sat Nov 05, 2011 10:48 am
I have code that copies one PDS to another PDS. But when i execute the code i'm getting RC(10) from the LMCOPY statement and when i googled i got it as the Dataset is not found. Believe me I have the dataset name here in the given dataid. Still its not accepting. Can anyone suggest me where do i go wrong. Here is the code i have.
Thanks,
Viswa
/* REXX */
TRACE ?I
ADDRESS ISPEXEC
"LMINIT DATAID(INDD) DATASET('ZEAL804.MOUM)"
SAY INDD
"LMINIT DATAID(OUTDD) DATASET('ZEAL804.MOUN)"
SAY OUTDD
"LMCOPY FROMID(INDD) TODATAID(OUTDD)"
"FROMMEM(MEM1) TOMEM(MEM2)"
SAY COPIED
"LMFREE DATAID('INDD')"
SAY FREE INDD
"LMFREE DATAID('OUTDD')"
SAY FREE OUTDD
TRACE ?I
ADDRESS ISPEXEC
"LMINIT DATAID(INDD) DATASET('ZEAL804.MOUM)"
SAY INDD
"LMINIT DATAID(OUTDD) DATASET('ZEAL804.MOUN)"
SAY OUTDD
"LMCOPY FROMID(INDD) TODATAID(OUTDD)"
"FROMMEM(MEM1) TOMEM(MEM2)"
SAY COPIED
"LMFREE DATAID('INDD')"
SAY FREE INDD
"LMFREE DATAID('OUTDD')"
SAY FREE OUTDD
Thanks,
Viswa