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

Copy Members


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
joy_deep

New User


Joined: 03 Jan 2006
Posts: 14

PostPosted: Tue Sep 27, 2011 6:57 pm
Reply with quote

Hi,

I want to copy selected patterned members from one PDS to another.

Eg: I have one PDS say A.B.C, in which 400 members are there, I want to copy 250 Members, starting with INV* to another PDS say D.E.F. Can we do it through Rexx?

Thanks and Regards!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 7:00 pm
Reply with quote

Quote:
I want to copy selected patterned members from one PDS to another.

Go ahead, nobody will prevent You form doing it
Quote:
Can we do it through Rexx?


if You do not want YES/NO answers do not ask YES/NO questions

to make the most out of the questions You ask and to forecast the comments You might receive
it would be wise for You to read and meditate on
how to ask questions the smart way
here catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here support.microsoft.com/kb/555375
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Sep 27, 2011 7:01 pm
Reply with quote

Quote:
Can we do it through Rexx?

Yes. We can.

Do you want how also? icon_wink.gif

Search through forum...
Back to top
View user's profile Send private message
joy_deep

New User


Joined: 03 Jan 2006
Posts: 14

PostPosted: Tue Sep 27, 2011 7:03 pm
Reply with quote

Please help. I am new to Rexx and I need a little help here.

Thanks!
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Sep 27, 2011 7:09 pm
Reply with quote

What is the problem with just using ISPF Option 3.3?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 7:11 pm
Reply with quote

why reinvent the wheel when ispf option 3.3 provides such facility just by asking

here is the panel flow


Code:
   Menu  RefList  Utilities  Help                                               
 ——————————————————————————————————————————————————————————————————————————————
                               Move/Copy Utility                               
 Option ===> c                                                                 
                                                                               
  C  Copy data set or member(s)          CP Copy and print                     
  M  Move data set or member(s)          MP Move and print                     
                                                                               
 Specify "From" Data Set below, then press Enter key                           
                                                                               
 From ISPF Library:                                                             
    Project . . . ENRICO        (--- Options C and CP only         ---)         
    Group . . . . ISPF     . . .          . . .          . . .                 
    Type  . . . . EXEC                                                         
    Member  . . . isf*             (Blank or pattern for member list,           
                                    "*" for all members)                       
                                                                               
 From Other Partitioned or Sequential Data Set:                                 
    Name  . . . . . . .                                                         
    Volume Serial . . .            (If not cataloged)                           
                                                                               
 Data Set Password  . .            (If password protected)                     


Code:
   Menu  RefList  Utilities  Help                                               
 ——————————————————————————————————————————————————————————————————————————————
 COPY     From ENRICO.ISPF.EXEC                                                 
 Command ===>                                                                   
                                                                               
 Specify "To" Data Set Below                                                   
                                                                               
 To ISPF Library:                 Options:                                     
    Project  . . ENRICO              Enter "/" to select option                 
    Group  . . . ISPF                   Replace like-named members             
    Type . . . . dummy               /  Process member aliases                 
                                                                               
 To Other Partitioned or Sequential Data Set:                                   
    Name  . . . . . . .                                                         
    Volume Serial . . .           (If not cataloged)                           
                                                                               
 Data Set Password  . .           (If password protected)                       
                                                                               
 To Data Set Options:                                                           
    Sequential Disposition        Pack Option         SCLM Setting             
    1  1. Mod                     3  1. Yes           3  1. SCLM               
       2. Old                        2. No               2. Non-SCLM           
                                     3. Default          3. As is               


Code:
   Menu  RefList  Utilities  Help                                               
 — ◊———————————————————————————————————————————————————————————————————————◊ ——
 C ◊                       Allocate Target Data Set                        ◊   
 C ◊ Command ===>                                                          ◊   
   ◊                                                                       ◊   
 S ◊ Specified data set ENRICO.ISPF.DUMMY                                  ◊   
   ◊ does not exist.                                                       ◊   
 T ◊ If you wish to allocate this data set, select one of the options      ◊   
   ◊ below.                                                                ◊   
   ◊                                                                       ◊   
   ◊ Allocation Options:                                                   ◊   
   ◊    1. Allocate using the attributes of:                               ◊   
 T ◊       ENRICO.ISPF.EXEC                                                ◊   
   ◊    2. Specify allocation attributes                                   ◊   
   ◊                                                                       ◊   
   ◊    Use existing SMS attributes for option 1                           ◊   
 D ◊                                                                       ◊   
   ◊ Instructions:                                                         ◊   
 T ◊   Press ENTER to allocate data set.                                   ◊   
   ◊   Enter CANCEL or END to cancel allocation.                           ◊   
   ◊———————————————————————————————————————————————————————————————————————◊   
       2. Old                        2. No               2. Non-SCLM           
                                     3. Default          3. As is               


Code:
   Menu  Functions  Utilities  Help                                             
 ——————————————————————————————————————————————————————————————————————————————
 COPY        ENRICO.ISPF.EXEC      TO ENRICO.ISPF.DUMMY      Row 00001 of 00004
 Command ===>s *                                                Scroll ===> CSR 
    Name     Prompt          Size    Created           Changed            ID   
 . ISFT00                      30   2011/09/15   2011/09/15 07:59:42    ENRICO 
 . ISFT01                      42   2011/06/15   2011/09/14 17:50:24    ENRICO 
 . ISFT02                      38   2011/06/15   2011/06/15 10:44:22    ENRICO 
 . ISFT03                      47   2011/06/15   2011/06/15 10:53:19    ENRICO 
   **End**                                                                     


Code:
   Menu  Functions  Utilities  Help                                             
 ——————————————————————————————————————————————————————————————————————————————
 COPY        ENRICO.ISPF.EXEC      TO ENRICO.ISPF.DUMMY      Row 00001 of 00004
 Command ===>                                                  Scroll ===> CSR 
    Name     Prompt          Size    Created           Changed            ID   
 . ISFT00   *COPIED            30   2011/09/15   2011/09/15 07:59:42    ENRICO 
 . ISFT01   *COPIED            42   2011/06/15   2011/09/14 17:50:24    ENRICO 
 . ISFT02   *COPIED            38   2011/06/15   2011/06/15 10:44:22    ENRICO 
 . ISFT03   *COPIED            47   2011/06/15   2011/06/15 10:53:19    ENRICO 
   **End**
Back to top
View user's profile Send private message
joy_deep

New User


Joined: 03 Jan 2006
Posts: 14

PostPosted: Tue Sep 27, 2011 7:13 pm
Reply with quote

I have to select 150 members manually. That's tiring. Also, this is repeated task. Everytime if I have to select so many members... and so I need a Rexx program to do it.

Thanks!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 7:18 pm
Reply with quote

reread Your initial request and the panel sequence I showed You
it fits perfectly Your requirement

and if You do not fill the mask in the initial screen, when the member list is shown You can use any <arbitrary> mask ,
for example s *zzz*

and an advice, before writing tools ( or rather as in this case use what others have developed )
learn to use those You have available
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 27, 2011 7:20 pm
Reply with quote

Code:
From ISPF Library:                                                             
    Project . . . ENRICO        (--- Options C and CP only         ---)         
    Group . . . . ISPF     . . .          . . .          . . .                 
    Type  . . . . EXEC                                                         
    Member  . . . isf*


Code:
 COPY        ENRICO.ISPF.EXEC      TO ENRICO.ISPF.DUMMY      Row 00001 of 00004
 Command ===>s *   


you will receive little sympathy from us.

half a dozen keys stroks, hit enter a couple of times
and it is done.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Sep 27, 2011 7:22 pm
Reply with quote

joy_deep, when posting in this forum, there is a certain amount of background material that we expect you to already know, and there are some default assumptions we have to make unless you explicitly state otherwise. You are expected to have in-depth knowledge of the environment(s) where you're REXX exec is to be used. That may be batch/MVS, TSO, ISPF, DB2, or one of the many others. If you want to manage datasets, we expect you to have to necessary technical knowledge related to those processes.

That being said, let's move on. REXX doesn't deal with datasets. It relies on the external environments to do that. The normal method of copying PDS members from one PDS to another is to use the IBM IEBCOPY utility. If this is a batch process (and you haven't told us that it isn't) then you can just use the IEBCOPY and pretty much forget about the REXX exec. Building up from there, if you're familiar with ISPF Library Management (LM) Services, especially the LMMCOPY Service, you can use them in a REXX program just like you would in any other program. If you want to be somewhere in between either option, you can do individual copies of members one-at-a-time, using IEBGENER, SORT, or even the basic REXX EXECIO functions (I wouldn't recommend that, though), in a loop structure where you use TSO to allocate the input and output DD's and to call the appropriate utility/program.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 7:23 pm
Reply with quote

Dick,
being able to quote in the resume
skills... ISPF / REXX tool developing is more <exciting> isn' t it icon_wink.gif
Back to top
View user's profile Send private message
joy_deep

New User


Joined: 03 Jan 2006
Posts: 14

PostPosted: Tue Sep 27, 2011 7:24 pm
Reply with quote

Yes, it fits. But I am looking for a better and easier way to do it.

Thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 7:25 pm
Reply with quote

Quote:
But I am looking for a better and easier way to do it.


You have to tell the source dataset YES
You have to tell the destination dataset YES
You have to allocate the destination dataset YES
You have to specify the members to be copied YES

ISPF does all that for You
if You can think that You can do it in a better way go ahead
Back to top
View user's profile Send private message
joy_deep

New User


Joined: 03 Jan 2006
Posts: 14

PostPosted: Tue Sep 27, 2011 8:00 pm
Reply with quote

Thanks! I did not know about "S *" option.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 27, 2011 8:07 pm
Reply with quote

take note also of the <arbitrary> pattern capability s *zzz*

topic cleaned up of the hottest flames icon_biggrin.gif
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 -> CLIST & REXX

 


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 Duplicate several members of/in one l... JCL & VSAM 7
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top