> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[email protected]] On Behalf Of Paul Gilmartin > Sent: Thursday, July 26, 2012 10:20 AM > To: [email protected] > Subject: Re: Using SSH or SCP in REXX under TSO > > On Thu, 26 Jul 2012 09:55:07 -0500, McKown, John wrote: > > > >Remember! that scp on z/OS does an EBCDIC to ASCII > translation. If you need a binary transfer, > >you'll need to use sftp. > > > I've not tried sftp. I'd expect that sftp and scp are both > variants of ssh, > and the EBCDIC<->ASCII translation is intrinsic to the socket > interface. > Does z/OS sftp have a BINARY subcommand? Are you extrapolating too > much from Co:z?
No. sftp uses a separate SSH "subsystem" which does not do the code translation. IIRC, sftp as distributed by IBM only does a binary transfer. The Dovetailed Technologies enhancments to z/OS sftp allows for code translation. And, in addition, allows transfers to/from z/OS legacy data sets and access to the JES SPOOL (get output and put, as in submit, jobs). > > I used ssh rather than sftp or scp in the example I posted > (I've enhanced > it since) partly because of familiarity; partly it gives most > control with > least terminal interaction. Between two ASCII systems, I have done: > > ssh remote-host "cd wherever && tar -cf - ." | tar -xvf - > > With EBCDIC, I'd need an iconv in the pipe. You mean to do the equivalent of a "binary" transfer? I don't think you'd succeed. I almost never use ssh for file transfer. I guess because I find scp easier, for me. scp /wherever/* user@remote-host:/wherever/ On Linux, I've also done: cd /wherever; echo -e 'cd /wherever\nmput *\nquit\n' | sftp user@remote; cd - > > I believe that if ssh (or kindred) needs to prompt for confirmation > or password it will write the prompt to stderr and read the response > from /dev/tty. This might work from native z/OS UNIX (USS), perhaps > even from TSO OMVS. It's less likely from TSO or BPXWUNIX. You cannot do ssh under TSO OMVS. That is documented by IBM in the OpenSSH manual. The reason given on one of the forums was the fact that there is no way to "nodisplay" what you type in for the passphrase or password when running under TSO OMVS. > > -- gil -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
