> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of John S. Giltner, Jr.
> Sent: Monday, March 19, 2007 8:36 PM
> To: IBM-MAIN@BAMA.UA.EDU
> 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 [EMAIL PROTECTED] '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 "[EMAIL PROTECTED]". 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 [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to