ZosDatasetÝE¨: dataset read error: seek not allowed on GET

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
dmhines
Posts: 3
Joined: Tue Nov 06, 2018 10:29 am

ZosDatasetÝE¨: dataset read error: seek not allowed on GET

Post by dmhines » Wed Nov 21, 2018 9:39 am

Sporadic users a getting the following errors when trying to download a dataset . They are using a client on windows called Chilkat DLL.

Any ideas? I searched forum and see these errors on a PUT ... but not a get ...

Thanks ...


Dataset info:

Data Set Name . . . . : N414.N414LO0Z.PL2664TP.W325

General Data Current Allocation
Management class . . : MC35NOBK Allocated cylinders : 1
Storage class . . . : SCBASE Allocated extents . : 1
Volume serial . . . : BAT272
Device type . . . . : 3390
Data class . . . . . : **None**
Organization . . . : PS Current Utilization
Record format . . . : U Used cylinders . . : 1
Record length . . . : 0 Used extents . . . : 1
Block size . . . . : 27998
1st extent cylinders: 1
Secondary cylinders : 10 Dates
Data set name type : Creation date . . . : 2018/11/20


Co:Z SFTP Server version: 5.0.0 (6.4p1) 2018-01-10
Copyright (C) Dovetailed Technologies, LLC. 2008-2018. All rights reserved.
Ý28.054¨ session opened for local user FTPPGS03 from Ý10.152.83.220¨
Connection established, local_addr=153.2.18.193 local_port=22 remote_addr=10.152
Ý28.187¨ opendir "//N414.N414LO0Z.PL2664TP"
Ý28.546¨ opendir "/+mode=binary"
Ý28.642¨ closedir "/+mode=binary"
Ý28.738¨ open "//N414.N414LO0Z.PL2664TP.W325" flags READ mode 0666
ZosSettingsÝI¨: Transfer options: mode=binary
ZosDatasetÝI¨: Opening dataset N414.N414LO0Z.PL2664TP.W325 for read with options
ZosDatasetÝE¨: dataset read error: seek not allowed
Ý29.833¨ sent status Failure
ZosDatasetÝE¨: dataset read error: seek not allowed
Ý29.833¨ sent status Failure
ZosDatasetÝE¨: dataset read error: seek not allowed

This read error occurs thousands of times in the log ...

and ends with:

Ý84.219¨ sent status Failure
ZosDatasetÝE¨: dataset read error: seek not allowed
Ý84.219¨ sent status Failure
ZosDatasetÝE¨: dataset read error: seek not allowed
Ý84.219¨ sent status Failure
Ý84.554¨ forced closedir "//N414.N414LO0Z.PL2664TP"
Ý84.554¨ forced close "//N414.N414LO0Z.PL2664TP.W325" bytes read 393216 written
ZosDatasetÝI¨: Closing dataset //N414.N414LO0Z.PL2664TP.W325 before completion -
Ý84.556¨ session closed for local user FTPPGS03 from Ý10.152.83.220¨

dovetail
Site Admin
Posts: 1856
Joined: Thu Jul 29, 2004 12:12 pm

Re: ZosDatasetÝE¨: dataset read error: seek not allowed on GET

Post by dovetail » Wed Nov 21, 2018 7:19 pm

This error means that the client is trying to read or write a z/OS data set non-sequentially.
Co:Z only supports data set I/O sequentially. The I/O must start from the beginning and proceed sequentially without any skips, rewinds, or jumps.

Background:
The low-level SFTP protocol was really designed for Unix-style byte-oriented files, which can be randomly addressed by byte offset. Each SFTP "FXP_READ" packet has a read-offset and a length. It really looks like a remote filesystem API. For dataset I/O, all READs and WRITEs must be strictly sequential, and start with 0.

This error is often caused by an SFTP client that is trying to "restart" the download of a file, since it detects that the local file already exists.
Take for example the ubiquitous OpenSSH SFTP client: the "get" subcommand has an option "-a" which means that if the local file exists, it will start reading the server file at offset=(length of local file) to "resume" downloading a file. If you use this option with a dataset, it will fail for the reason given above.

Conclusion:
I am not familiar with the Chilkat DLL, but I did browse the reference documentation. It isn't possible for me to say what you are doing wrong, but it is almost certainly related to how your program (or the library) is reading data sets over SFTP. You must start at offset 0, and then increase the read offset by the number of bytes that you read in the prior read. Anything else will cause this error. If it is not obvious what your program is doing wrong, I suggest contacting the vendor for support giving them this information.

(BTW: we have plans to document this issue better, since we have been seeing occurrences of it more frequently of late).

dmhines
Posts: 3
Joined: Tue Nov 06, 2018 10:29 am

Re: ZosDatasetÝE¨: dataset read error: seek not allowed on GET

Post by dmhines » Tue Nov 27, 2018 9:09 am

Thanks .. I will forward this info to the developer and see if they can make adjustments to the client or process.

Post Reply