IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can I copy the member from lib to lib


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 27
Location: China

PostPosted: Tue May 20, 2008 1:13 pm
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
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 20, 2008 1:14 pm
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: 27
Location: China

PostPosted: Wed May 21, 2008 12:14 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 21, 2008 12:22 pm
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

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Wed May 21, 2008 10:26 pm
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: 27
Location: China

PostPosted: Thu May 22, 2008 7:39 am
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top