How to copy dataset between users

Posted on 2011-05-05
Last Modified: 2012-05-11
I would like to copy a mainframe partitioned dataset from one user to another.  I know how to do this on unix, but IBM mainframes don't run unix, at least not for parititioned data sets.  
Question by:MainFrameDBA
    LVL 57

    Accepted Solution

    From batch JCL you can run a job using IEBCOPY.  If you have access to TSO/ISPF, there is a utility menu that will allow you to do this.

    Do you want to copy the whole PDS or just selected members?

    Is the target dataset brand new, or an exsisting one?

    If existing, do you want to repalce any members that are have the same name?


    Author Comment

    I would like to copy the entire PDS to a new PDS and I have access to TSO/ISPF.  I tried using the clone command (which I learned about 5 minutes ago) but that came back with a permission error.  Yesterday I read about the xmit command but I don't know what to use for the node name:

    xmit   node.userid dsn (dataSetName)          transmit a data set to a different user
    receive                                                          receive the data set someone sent
    LVL 57

    Assisted Solution

    Well if you got permission denied then either you don't have read authority to the source PDS or you don't have authority to create the destination file.

    Typically the node is your JES2 subsystem name.

    Bewlow is sample IEBCOPY JCL that should do it.

    1) You need to create and put a valid job card for your enviroment where I have "put valid jobcard here"
    2) You need to put the real datatset name for the source pds where I have (please note it is in the job TWICE).
    3) You need to put the real datatset name for the targe pds where I have

    This does assume you have read authority to the source file and create authority (called ALTER in RACF) for the target.

    // put valid jobcard  here                                        
    //COPYPDS  EXEC PGM=IEBCOPY                                            
    //SYSPRINT DD SYSOUT=*                                                
    //SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(10,100))                          
    //SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(10,100))                          
    //INDD1    DD DISP=SHR,                            
    //OUTDD1   DD DISP=(,CATLG),,                      
    //            UNIT=SYSDA,                        
    //SYSIN  DD *                                                          
      COPY  INDD=INDD1,OUTDD=OUTDD1                                        

    Author Comment

    Most likely I don't have read permission to access my colleague's files, I did get that permission error.

    How can I determine the JES2 subsystem name?  I'm new to IBM.  
    LVL 57

    Assisted Solution

    Actually if you are sending the file to somebody within your own JES2 system you should not need to specify a node name.

    However, somebody who has permission to read the file must issue the XMIT command.
    LVL 57

    Expert Comment

    Thanks and welcome to the world of z/OS.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
    Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now