Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To copy the all the files from one qualifier to another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Wed Apr 09, 2008 12:15 pm    Post subject: To copy the all the files from one qualifier to another
Reply with quote

Hi, I have a requirement that I have files in One test region and exactly the same set of files need to be copied for use in another test region. Hence I just have to change the second qualifier. Since the files are huge in number I got to do it by some shorter way. Can anyone help me with suggetions ?

E.g MAN.AHAM.FILES.** is to be copied to MAN.PARAM.FILES.**

The qualifiers following the 3rd qualifier (FILES) are random but I want exact replica of all the filenames(and contents) except for the second qualifier.
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Apr 09, 2008 8:57 pm    Post subject: Reply to: To copy the all the files from one qualifier to an
Reply with quote

aham,

find below the REXX code. You will have to make few changes according to your requirement.

The below code is for changing the second qualifier to UATT and then creating it with the same attributes. You will have to make some changes for copying it instead of just creating it. You can use 'TSO COPY' for the same.

First you shd have a dataset with the list of all the files that needs to be copied.

Code:
/* REXX */                                                                             
FILE14=your.file.name /* which is nothing but u r dataset which */
/*wud have the list of all datasets that needs to be changed */                                                         
ADDRESS "TSO"                               
"allocate dataset('"file14"'),             
          fi(dtset14) shr"                 
"execio * diskr dtset14 (stem B.)"         
"FREE DDNAME(DTSET14)"                     

DO J = 1 TO B.0                                                                         
 b.j = strip(b.j)                           
  len = length(b.j)                         
posx = pos(".",B.J)                         
  lstr = left(b.j,posx)                     
  rstr = right(b.j,POSX+3)                 
  line = lstr||"UATT"||rstr                 

                                     

ADDRESS "TSO"                         
"FREE DDNAME(DTSET3)"                 
ADDRESS "TSO"                         
"ALLOC DA('"LINE"') F(dtset3)",       
"LIKE('"B.J"') NEW"                   
"FREE DDNAME(DTSET3)"                 
                                     
 end                       
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us