Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How can I copy the member from lib to lib

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 21
Location: China

PostPosted: Tue May 20, 2008 1:13 pm    Post subject: How can I copy the member from lib to lib
Reply with quote

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
View user's profile Send private message
References
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3725
Location: Brussels once more ...

PostPosted: Tue May 20, 2008 1:14 pm    Post subject:
Reply with quote

Yes, ISPF function LMCOPY should work fine.
Back to top
View user's profile Send private message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 21
Location: China

PostPosted: Wed May 21, 2008 12:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3277
Location: italy

PostPosted: Wed May 21, 2008 12:22 pm    Post subject: Reply to: How can I copy the member from lib to lib
Reply with quote

google or search the forum for samples

why not look also at the manuals
starting from http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html#other_pubs

and choosing the release You are using
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 630
Location: work

PostPosted: Wed May 21, 2008 10:26 pm    Post subject: Reply to: How can I copy the member from lib to lib
Reply with quote

Hint: use LMINIT before LMCOPY
Back to top
View user's profile Send private message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 21
Location: China

PostPosted: Thu May 22, 2008 7:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1