Page 1 of 1

Clarification on LMCOPY

PostPosted: Sat Nov 05, 2011 10:48 am
by Viswanathchandru
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.
/* 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                           


Thanks,
Viswa

Re: Clarification on LMCOPY

PostPosted: Sat Nov 05, 2011 11:55 am
by Viswanathchandru
Thanks NicC for your time and reply.

1. From the Trace I got
*-* "LMCOPY FROMID(INDD) TODATAID(OUTDD)"
>L> "LMCOPY FROMID(INDD) TODATAID(OUTDD)"
+++ RC(10) +++


2. another one
ISPS100

Invalid service name
'FROMMEM(MEM1)' exceeds the allowable length of 8.


and one more small correction in the code i have attached its not
LMINIT DATAID(INDD) DATASET('ZEAL804.MOUM)"
SAY INDD
"LMINIT DATAID(OUTDD) DATASET('ZEAL804.MOUN)"
its
LMINIT DATAID(INDD) DATASET('ZEAL804.MOUM')"
SAY INDD
"LMINIT DATAID(OUTDD) DATASET('ZEAL804.MOUN')"
. Apologies for that.

Can anyone guide me where do i go wrong. Apologies if i'm wrong.

Thanks,
Viswa

Re: Clarification on LMCOPY

PostPosted: Sat Nov 05, 2011 3:43 pm
by Viswanathchandru
Hi folks,
Ya it worked. The problem is with the syntax. thanks a lot for your support and time.

Regards,
Viswa

Re: Clarification on LMCOPY

PostPosted: Sun Nov 06, 2011 12:09 am
by dick scherrer
Hello,

Good to hear it is working - thank you for letting us know :)

d

Re: Clarification on LMCOPY

PostPosted: Sun Nov 06, 2011 12:24 am
by MrSpock
Sorry nic. When I split this topic into the ISPF forum, somehow I missed your response.

Re: Clarification on LMCOPY

PostPosted: Sun Nov 06, 2011 1:18 am
by NicC
That's OK Mr Spock - the Romulans are on their way!

Re: Clarification on LMCOPY

PostPosted: Tue Nov 08, 2011 1:04 pm
by Viswanathchandru
Thanks Mr. Spock for redirecting the post to the proper topic.

Regards,
Viswa