COZ server appends local file name to end of MVS dataset

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
tombuch
Posts: 14
Joined: Tue Aug 10, 2010 7:02 am

COZ server appends local file name to end of MVS dataset

Post by tombuch »

Hi Support,

I am trying to put an MVS datset on a COZ server. The dataset is: D.UTT.TEST.TXT1

But there are already the following datasets:

D.UTT.TEST.TXT1.DDD
D.UTT.TEST.TXT1.TEST.TXT

I use the following put syntax:

put time.test //D.UTT.TEST.TXT1

but instead of creating the 'D.UTT.TEST.TXT1' dataset, the server creates: D.UTT.TEST.TXT1.TIME.TEST

uploading time.test to //D.UTT.TEST.TXT1/time.test

Is there a parm that I can change on the server to achieve what I am trying?

Or is this just the way it works?

Thank you.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: COZ server appends local file name to end of MVS dataset

Post by dovetail »

Hi Tom,

The problem is that there is an ambiguity as to whether D.UTT.TEST.TXT1 is a "file" or a (pseudo) "directory".
There is an underlying packet ("stat") that the client sends to ask us what kind of file it is, and we don't know the context so we answer that it is a directory.
Based on this, the client uses the name to form a new file name inside that directory.

The rules are described here: http://dovetail.com/docs/sftp/dsn-determination.html

So, if you putting to a dataset that has no datasets at lower levels, there isn't a problem.
If there are, then you need to use the syntax:

put time.test //!D.UTT.TEST.TXT1
mhenson
Posts: 3
Joined: Tue Nov 19, 2013 5:37 am

Re: COZ server appends local file name to end of MVS dataset

Post by mhenson »

i had the same issue and did use the //! prefix . This works fine in so far as the MVS dataset naming convntion is maintained , however the problem i got was that when the file did not exist , COZBATCH still returns cond code 0 instead of cond code 1

i have raised seperate discussion , but interested to know if same problem encountered by Tombuch
Hwfa
Posts: 1
Joined: Thu Feb 12, 2015 6:12 am

Re: COZ server appends local file name to end of MVS dataset

Post by Hwfa »

There is an underlying packet ("stat") that the client sends to ask us what kind of file it is, and we don't know the context so we answer that it is a directory.
Post Reply