MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Use Rexx to copy member

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
marcovan
Beginner


Joined: 10 May 2006
Posts: 5
Topics: 3

PostPosted: Wed May 10, 2006 3:04 pm    Post subject: Use Rexx to copy member Reply with quote

I did a search and coud not find anything relevant. I was hoping some of you might help as I am completely new to the mainframe and rexx enviroment.

Can REXX do something like this?

A REXX exec that will take input from a user at a terminal that will perform a simple member copy from one pds to a static pds. This process will also be allow the user to change the member name on the output side. Once the copy is performed, do a CALL to execute CA7CCI (ca7 rexx interface) using the output member name as the jobname to the demand parameter.

For example, if a user invokes REXCOPY (sample name) it would be interactive where it would ask for

INPUT DSN =
INPUT MEMBER=
OUTPUT MEMBER =

No need to ask for OUTPUT DSN as it is always going to be the same.

So after executing the REXX it would look like this
INPUT DSN = MY.INPUT.DSN
INPUT MEMBE = AEIOU
IOUT DSN = MY.STATIC.DSN
OUTPUT MEMBER = BLDFSFD

The end result, member aeiou would be copied to my.static.dsn as member bldfsd.

Once the copy is done, a CA7CCI would be invoked to demand the job BLDFSFD to CA-7.

Is this at all feasible?

Thanks!

Marco
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed May 10, 2006 4:35 pm    Post subject: Reply with quote

Hi Marco. There are many ways to do this. The easiest, but not the best, is to use the COPY command that is part of TSO (well, technically it is not part of TSO but that is a different topic). The problem with COPY is that it requires exclusive use of the dataset(s) (DISP=OLD if you familiar with that from JCL).

A better way, assuming you are running this under ISPF, is to use the ISPF services LMINIT, LMCOPY and LMFREE. They will handle the synchornization (sharing, ENQs) for you and will copy ISPF statistics in case that matters.

Another way, also easy, is to use EXECIO which will do the I/O. To do that, you need to use TSO's ALLOC command for the files, including the member names(!!) and do the I/O yourself. Search for Execio here or Google or Google groups for examples.

Finally, in MVS, people will be more used to ISPF full screen interfaces than line mode queries. Line mode queries can be done wit Say and Pull keywords. Full screen interfaces require understanding of how to create ISPF panels and also require access to data sets where you can put the panels so that other people can read them. For a first REXX/MVS program, that may be beyond the scope of what you are doing. As a usually advanced topic, it is possible to imbed panels directly within a Rexx exec. Type TSO ISRDDN M ISRSETLN on a command line and you may find an example of doing this on your system or again, you can search the web.
Back to top
View user's profile Send private message Visit poster's website
marcovan
Beginner


Joined: 10 May 2006
Posts: 5
Topics: 3

PostPosted: Thu May 11, 2006 8:44 pm    Post subject: Reply with quote

Thank semigeezer.

That's a great command. It will take me a while to go through all that stuff, but I gather I will be reading those ISPF manuals quite a bit.l
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group