|
View previous topic :: View next topic
|
| Author |
Message |
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
I have an question=> how can I copy the member from lib to lib,
The requirment is that we know the from lib, and lib, member list as well.
There are thousand of members included in one lib.
Could we use Rexx to implement the function just as we do in the line command using 'C' ? : ) |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8798 Location: Welsh Wales
|
|
|
|
| Yes, ISPF function LMCOPY should work fine. |
|
| Back to top |
|
 |
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
Hi, expat:
Thanks.
However, when I try to involve the ISPF command in Rexx but failed,
return error like that =>
ISPS108
Invalid length
Parameter 'FROMID' exceeds the allowable length.
The Rexx code like that.
/* REXX */
TRACE N
DDVAR1 = ''xxxx.yy.JCL''
DDVAR2 = 'xxxx.yy.SORC'
TEST01 = 'TEMP'
ADDRESS ISPEXEC 'LMCOPY FROMID(&DDVAR1) FROMMEM(&TEST01) +
TODATAID(&DDVAR2)'
Could you please give me a hand? |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
| Hint: use LMINIT before LMCOPY |
|
| Back to top |
|
 |
kennedy_zhu
New User
Joined: 30 Nov 2007 Posts: 27 Location: China
|
|
|
|
Hi, all:
Thanks for your gently reminder. I get some sample like that =>
ADDRESS ISPEXEC
'LMINIT DATAID(INDD1) DATASET(''xxx.yyy.JCL'')'
'LMINIT DATAID(OUTDD1) DATASET(''xxx.yyy.SORC'')'
'LMCOPY FROMID('INDD1') TODATAID('OUTDD1') FROMMEM(TEMP)
TOMEM(TEMP) REPLACE PACK'
IF RC NOT = 0 THEN
SAY 'FAILED TO COPY'
/* LEAVE */
ELSE
SAY 'COPIED'
'LMFREE DATAID('INDD1')'
'LMFREE DATAID('OUTDD1')'
It works. Thanks! : ) |
|
| Back to top |
|
 |
|
|