Problem getting z/OS dataset from another LPAR.

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
cmcgavic
Posts: 14
Joined: Wed Jul 07, 2010 1:55 pm
Location: Louisville, Ky

Problem getting z/OS dataset from another LPAR.

Post by cmcgavic »

Getting the following when trying to run the COZBATCH on one LPAR and get a file from another LPAR that is also running COZSFTP and SSH:

fromdsn(AZS003.JCL.CNTL(SFTPPASS)).N.: 1 records/80 bytes read; 9 bytes written in 0.006 seconds (1.465 KBytes/sec).
cozsftp> lzopts mode=text,servercp=ISO8859-1
mode=text servercp=ISO8859-1
cozsftp> get //AZS003.ETC.RELEASE //DD:DOWNLOAD
.83.303. Couldn't stat remote file: No such file or directory
.83.303. File "//AZS003.ETC.RELEASE" not found.
CoZBatch.I.: returning rc=exitcode=1

I've confirmed that the file exists on the other LPAR. I also tried to use the cozsftp line mode from USS and get the same thing. It also won't let me CD to //AZS003. I get the following when I do:

[05.551] Couldn't canonicalise: No such file or directory
dovetail
Site Admin
Posts: 2025
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Are you sure that the z/OS server is running Co:Z sftp-server for this session and not IBM Ported Tools sftp-server?

To check, add this before your "get" command-

Code: Select all

ls /+
This should display the current Co:Z settings of the remote server. If you get "directory not found", then you are running IBM's sftp-server and not Co:Z.

Beyond this, there are some suspicious things about your job:

1) It is a little odd that you are setting the remote codepage to ISO8859-1. Is the remote dataset in ASCII?

2) If you are setting the local side to "text", you will somehow need to set the remote side to text also. Is there a reason that you want to use "text" mode between two z/OS systems? A better way to send/receive a z/OS dataset between two z/OS systems (if you don't want to do any transformations) is:

Code: Select all

cozsftp> lzopts mode=binary  (the default)
cozsftp> lzopts linerule=rdw  (not necessary if the RECFM=F or FB and same LRECL)
cozsftp> ls /+mode=binary,linerule=rdw    (remote should match local)
cozsftp> get //HLQ.REMOTE.DSN //DD:DOWNLOAD
cmcgavic
Posts: 14
Joined: Wed Jul 07, 2010 1:55 pm
Location: Louisville, Ky

Post by cmcgavic »

I had left out the 'Activating Co:Z' step, my apologies. I completed that step on both LPAR's I'm testing with and now it works.

As far as the codepage, I was tinkering with anything to get it to work. Please keep in mind I'm a career mainframe guy with very little UNIX exposure. I'm pretty slow with just basic UNIX stuff. The remote file I was trying to 'Get' was just a z/OS text flat file.

The reason to move text files between LPARS would include PDS members for Developers.

I'll tinker with your 'Better' way example.
Post Reply