When issuing a put command to create a dataset, or get to a local dataset using
the cozsftp client, the resulting dataset name is determined as follows:
put myfile //HLQ.LEVEL (a remote client using the Co:Z SFTP server) get myfile //HLQ.LEVEL (using the cozsftp client)
In most cases, this is acceptable behavior. However, there are cases where the supplied
name should be treated as a dataset rather than a "directory" (as in Case 3 above). If this
is the required behavior, a different dataset prefix can be supplied: //!
or /-/!.
put myfile //!HLQ.LEVEL (a remote client using the Co:Z SFTP server) get myfile //!HLQ.LEVEL (using the cozsftp client)
Note: In release 2.4.0, this was relaxed so that the
'!' decorator may appear anywhere in the data set name.
|
Table D.2. Dataset Name determination - DSN contains "!" decorator
|
In release 2.4.0,
the maxdsndirlevels setting was added to specify
the maximum number of levels that a data set name can have before it is always considered as a new file rather
than a (pseudo) directory.
For example:
(a remote client connected to Co:Z SFTP server) sftp> ls -alf //kirk.dsn.test Volume Referred Ext Tracks Used Recfm Lrecl BlkSz Dsorg Dsname VPWRKC 2013/06/06 1 1 1 U 0 6144 PS KIRK.DSN.TEST.TST1 VPWRKB 2013/06/06 1 15 1 FB 80 27920 PS KIRK.DSN.TEST.TXT2 sftp> put local.file //kirk.dsn.test Uploading local.file to //kirk.dsn.test/local.file... sftp> put local.file //!kirk.dsn.test
Uploading local.file to //kirk.dsn.test ... sftp> rm //kirk.dsn.test sftp> ls /+maxdsndirlevels=2
/+maxdsndirlevels=2 sftp> put local.file //kirk.dsn.test
Uploading local.file to //kirk.dsn.test ... sftp> rm //kirk.dsn.test sftp> cd //kirk.dsn.test
Couldn't stat remote file: No such file or directory
| //kirk.dsn.test is treated as a "directory", since there is no data set with that name but
there are data sets at lower levels. Since the sftp client sees a directory, it will create
a new file name in that directory. The resulting DSN is |
| The use of the |
| Setting this option will mean that DSNs with more than two levels are never considered as pseudo directories. |
| The use of the |
| Since this DSN has more levels than |
Recommendation:
When creating new data sets where it is possible that data sets exist at lower levels,
use the //! or /-/! syntax or the
maxdsndirlevels option.





