RE: SCP and MVS data sets?



-----Original Message-----
From: IBM Mainframe Discussion List
[mailto:IBM-MAIN@xxxxxxxxxxx] On Behalf Of John S. Giltner, Jr.
Sent: Monday, March 19, 2007 8:36 PM
To: IBM-MAIN@xxxxxxxxxxx
Subject: Re: SCP and MVS data sets?


Martin S. wrote:
If i do a
/bin/scp "//'USER9000.MVSDAT'" fraserver.de.dbx.com:/csx

I get a message that USER9000.MVSDAT is not found.


If I do a
cat "//'USER9000.MVSDAT'"
everything works fine.

Is it possible that the open function is different in SCP?

Martin


Some Unix System Services commands support access to MVS
datasets, SSH
(which is what SCP uses) does not. You can use OCOPY to get
the file to
a HFS.

You can also do the following weirdness to use ssh to copy a z/OS legacy
dataset using ssh. Note that this is a UNIX command, so you need to run
a UNIX shell or BPXBATCH or something like that.

cp "//'MVS.DATASET'" /dev/fd1|ssh user@remote 'cat >receiving.file'

This uses "cp", which is documented to support z/OS legacy datasets (cat
is NOT so documented) to /dev/fd1, which is "stdout". It then pipes that
into ssh, which connects to "user@remote". At the remote site, it
invokes "cat" to write to "receiving.file".

I also like Gil's use of "scp" instead of "ssh". I've not tried it, but
I trust him that it works.

I also just learned from Gil that "/dev/fd/?" works on z/OS UNIX. I've
been using "/dev/fd?" which also works. But "/dev/fd?" does not work on
Linux, whereas "/dev/fd/?" does. I think that I'll be changing my
habits. Oh, replace the ? with a number which is the file descriptor.

If you don't want to be prompted for a password or passphrase, then the
z/OS user running this must have an OMVS segment, with a "home"
directory, a .ssh subdirectory, and the appropriate digital cert
(ssh-keygen) with no passphrase.

--
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 listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
.



Relevant Pages

  • Re: Is SSH worth it??
    ... > We would be using SSH and SCP. ... SCP for automated scripts. ... > client will not be prompted for a password. ... remote machine, but imho it is better to swap client+server and give ...
    (Security-Basics)
  • Re: why does scp not use all my cores on a multi-cpu machine?
    ... When I ran my little test earlier, I observed that while I typed scp, both ... scp and ssh got "energized" and in fact ssh used more time than scp. ... Now since encrypting and transmitting has some elements of paralellity ... Right -- ssh, et. al. is an I/O bound process, so long as the network ...
    (comp.os.linux.misc)
  • Re: linux to linux scp in batch mode: how?
    ... reason why it works now is because of the dsa key. ... > been configured automatically when I set up ssh, I would imagine that I am ... >> I have ssh and scp up and running on my two Redhat 7.2 Linux machines, ... >> between the machines. ...
    (comp.security.ssh)
  • Re: Using SSH or SCP in REXX under TSO
    ... Using SSH or SCP in REXX under TSO ... Does z/OS sftp have a BINARY subcommand? ...
    (bit.listserv.ibm-main)