Hi Ron 

This is what I do 

Back up the items 

//         SET PAX1='sh cd /tmp; pax -wvf'
//         SET PAX2='./*.klan'
//S3      EXEC PGM=BPXBATCH,
//             REGION=0M,
//             PARM='&PAX1 //\''MY.MVS.BKUP\'' &PAX2'
//STDOUT   DD  SYSOUT=*
//STDERR   DD  SYSOUT=*


Create xmit dataset of 'MY.MVS.BKUP, FTP it 

On receiving system do a "receive indsn"  and run below 

//         SET PAX1='sh cd /tmp; pax -rvf'
//         SET PAX2='./*.klan'
//ACJVM   EXEC PGM=BPXBATCH,
//             REGION=0M,
//             PARM='&PAX1 //\''MY.MVS.BKUP\'' &PAX2'
//STDOUT   DD  SYSOUT=*
//STDERR   DD  SYSOUT=*



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Ron Wells
Sent: Wednesday, October 16, 2013 10:22 AM
To: [email protected]
Subject: Re: Copy from one Dir to another

Thanks...but in Diff lpar..
I can..because it is diff. named uss file...mount it...but was wanting to get 
away from extra steps.
thought there was a simple..way to backup..from Dir..file/sub dir..to a fiole 
then upload it back to another/other uss file system..



From:   Mark Zelden <[email protected]>
To:     [email protected]
Date:   10/16/2013 09:08 AM
Subject:        Re: Copy from one Dir to another
Sent by:        IBM Mainframe Discussion List <[email protected]>



On Tue, 15 Oct 2013 22:57:05 +0000, EXT-Schwarz, Barry 
<[email protected]> wrote:

>If both directories can be reached from an lpar, then why not use the 
>cp
command with a suitable wild card in the source path.  Or you could tar the 
source directory and pipe the output to an "untar" command that specifies the 
desired destination.
>

I haven't been paying a much attention to this thread, but when copying a file 
system or from dir to dir on the same LPAR (or shared file  systems within a 
sysplex) I often recommend copytree to people that aren't
unix savvy.   "cp" and pax are both options as mentioned, but you need to 
pay have the correct flags to get all the sub directories and preserve the file 
mode, owner info, date/time and other extended attributes (pgm control, apf, 
etc.). 

Assuming you have bpx.superuser authority, copytree will do all of this for you 
with simple syntax out having to know or understand all the pax or cp flag 
options.

There are other flags, but "s" will set the euid to 0 if you have the auth and 
the syntax is:

         copytree -s  fromdir  todir

copytree is a REXX exec and lives in /samples, so you can examine the source 
code for details if you wish, but there is a man page on it these days also. 

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS 
mailto:[email protected] ITIL v3 Foundation Certified Mark's MVS Utilities: 
http://www.mzelden.com/mvsutil.html
Systems Programming expert at http://search390.techtarget.com/ateExperts/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
Email Disclaimer
This  E-mail  contains  confidential  information  belonging to the sender, 
which  may be legally privileged information.  This information is intended 
only  for  the use of the individual or entity addressed above.  If you are not 
 the  intended  recipient, or  an  employee  or  agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
disclosure,  copying, distribution, or the taking of any action in reliance on 
the contents of the E-mail or attached files is strictly prohibited.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to