FTP files in their directory structure from HFS to AIX
Dear Fellow Listers, I have the need for transferring a set of files in a directory structure a number of levels deep from HFS on mainframe to a file system on an AIX box. >From one run to the next of the application that produces these files and directory structure, there may be a different number of files and different levels in the directory structure. I need to control the sending from the mainframe. Regular FTP and mput * does indeed transfer all the files, but none of the directories; I end up with all files (regardless of where they live in the input directory structure) in the root level of the destination. Not what I want... I know, I could write a REXX to surf the directory tree and create all the required commands (mkdir, cd, lcd, put etc.) to copy everything over, but I would like to avoid that if possible. Would any of you know a way to fulfil my need? All tips and hints appreciated. Cheers, Jantje. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: FTP files in their directory structure from HFS to AIX
> -Original Message- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of Jan MOEYERSONS > Sent: Monday, August 06, 2007 10:43 AM > To: IBM-MAIN@BAMA.UA.EDU > Subject: FTP files in their directory structure from HFS to AIX > > > Dear Fellow Listers, > > I have the need for transferring a set of files in a > directory structure a > number of levels deep from HFS on mainframe to a file system > on an AIX box. > From one run to the next of the application that produces > these files and > directory structure, there may be a different number of files > and different > levels in the directory structure. > > I need to control the sending from the mainframe. > > Regular FTP and mput * does indeed transfer all the files, > but none of the > directories; I end up with all files (regardless of where > they live in the > input directory structure) in the root level of the > destination. Not what I > want... > > I know, I could write a REXX to surf the directory tree and > create all the > required commands (mkdir, cd, lcd, put etc.) to copy > everything over, but I > would like to avoid that if possible. > > Would any of you know a way to fulfil my need? > > All tips and hints appreciated. > > Cheers, > > Jantje. I don't think this is possible using FTP. If you have OpenSSH implemented on z/OS and AIX, then you could use "scp". scp -r /zos/directory [EMAIL PROTECTED]:/aix/subdirectory Another possibility would be to use NFS to either mount the AIX subdirectory to z/OS or the z/OS subdirectory to AIX and use the "cp" command cp -r /zos/directory /nfs/mounted/aix/subdirectory The problem with "scp" is that is it "binary only" on its transfer. Likewise, if you mount the z/OS subdirectory on AIX, the only transfer that I see is "binary". However, if you mount the AIX subdirectory on z/OS, then you can use the "xlat(Y)" subparamter to do an automatic IBM-1047 to ISO8859-1 code translation. I do this latter here. This does require an NFS connection between the z/OS system and the AIX system. This is not really difficult to do. I did it! The last possibility that I can think of is to use "pax" on the z/OS side to create a "pax" (aka "tar") archive of the subdirectory. You then binary ftp that to the AIX box and unwind it. The "pax" command can do the code translation on the z/OS side so that the restored files are ASCII (ISO8859-1 actually) on the AIX box. The trick here is getting the "pax" or "tar" file restored automatically. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: FTP files in their directory structure from HFS to AIX
How about creating a tar file containing all of your directories & files, transferring that, then untarring it ? -- Regards - Grant Grant Ward Able Senior Systems Architect DTCC -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Jan MOEYERSONS Sent: Monday, August 06, 2007 10:43 AM To: IBM-MAIN@BAMA.UA.EDU Subject: FTP files in their directory structure from HFS to AIX Dear Fellow Listers, I have the need for transferring a set of files in a directory structure a number of levels deep from HFS on mainframe to a file system on an AIX box. From one run to the next of the application that produces these files and directory structure, there may be a different number of files and different levels in the directory structure. I need to control the sending from the mainframe. Regular FTP and mput * does indeed transfer all the files, but none of the directories; I end up with all files (regardless of where they live in the input directory structure) in the root level of the destination. Not what I want... I know, I could write a REXX to surf the directory tree and create all the required commands (mkdir, cd, lcd, put etc.) to copy everything over, but I would like to avoid that if possible. Would any of you know a way to fulfil my need? All tips and hints appreciated. Cheers, Jantje. DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: FTP files in their directory structure from HFS to AIX
> -Original Message- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of McKown, John > Sent: Monday, August 06, 2007 10:58 AM > To: IBM-MAIN@BAMA.UA.EDU > Subject: Re: FTP files in their directory structure from HFS to AIX > > The problem with "scp" is that is it "binary only" on its transfer. > > My mistake on this. According to an IBM'er on another forum, the z/OS implementation of scp automatically converts from IBM-1047 to ISO8859-1, but cannot do BINARY transfers. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html