Putting a file from Linux to z/OS

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
vattuluri
Posts: 2
Joined: Thu Sep 26, 2013 6:07 pm

Putting a file from Linux to z/OS

Post by vattuluri » Thu Sep 26, 2013 6:31 pm

Hi,

1) We are putting a file to z/OS from Linux. The first time we put, the data set gets created on z/OS and data is transferred.

2) If we try next time putting the file with the same data set name, we are getting the message Couldn't get handle:Failure.

Note: after Step 1) is done, we are manually renaming the data set on z/OS to something else. But if we delete the data set on z/OS the second time put works without any issue.

Can you please help us why after renaming the data set, the next put doesn't work?

Regards
VS

SteveGoetze
Posts: 377
Joined: Fri Jul 30, 2004 5:29 pm

Re: Putting a file from Linux to z/OS

Post by SteveGoetze » Fri Sep 27, 2013 1:39 pm

It's hard to tell what the issue might be without a copy of the Co:Z sftp server log. If you can reproduce the problem, send the log to info@dovetail.com we'll take a look.

The log files are written to /tmp by default in the following format: sftp-server.<userid>.<julian_day>.<hhmmss>.<pid>.log. However, your site might have moved the location. You can always retrieve the current log by issuing:

sftp> get /+error.log mylog.txt

TGibson
Posts: 10
Joined: Thu Jul 06, 2017 11:08 am

Re: Putting a file from Linux to z/OS

Post by TGibson » Thu Jul 20, 2017 1:00 pm

We are trying to Put a file from Linux to Z/OS C:oz server to a mvs dataset.

We are wanting to be able to Delete the destination file before we write the replacement. We use expiration dates on our MVS files and if the file has not expired when we go to delete the file we are getting an error. The error in the logs is indicating that I'm not able to delete since the expiration date hasn't been met.

When I created a file without the expiration date I ran my process and it was able to delete the file proving the expiration date on the file would prevent the delete function. I then attempted to issue the command remove //c00605.fg.test.disk purge. The purge portion of the command didn't come through to the Coz SFTP Server.

Do you have any way to purge MVS datasets that have a retention periods that has not expired?

Ý03.896¨ debug3: request 4: remove
Ý03.896¨ remove name "//c00605.fg.test.disk"
ZosExitInterfaceÝT¨: -> checkCommandWithFileArg(DELE //c00605.fg.test.disk)
ZosExitInterfaceÝT¨: <- checkCommandWithFileArg(true (module not available))
ZosUtilÝT¨: -> zos_remove(//c00605.fg.test.disk)
CatalogSearchÝD¨: filterKey="C00605.FG.TEST.DISK"
CatalogSearchÝT¨: -> search()
CatalogSearchÝT¨: search: total_length=65536, min_required=0, used=195, num_f
CatalogSearchÝT¨: <- search()
ZosUtilÝT¨: zos_remove: Removing "//'C00605.FG.TEST.DISK'"
IGD17105I CATALOG ERROR WHILE DELETING DATA SET
C00605.FG.TEST.DISK
RETURN CODE IS 84 REASON CODE IS 0 IGG0CLFK
ZosUtilÝE¨: Dataset remove of "C00605.FG.TEST.DISK" failed. errno=46 : EDC5046I

Post Reply