When I create a dataset with variable length records containing null lines, e.g.
record.1 = "Line 1"
record.2 = ""
record.3 = "Line 3"
"EXECIO 3 DISKW ddname (FINIS STEM record."
and sFTP it to a SSH daemon (in my case on i5) the file on the target system contains only record.1 and record.3. If record.2 is set to at least one blank, the target file contains all three lines.
Is this done by the target system or the sFTP client (the trim option does not influence the behaviour, it seems to be valid only for GET)? And if sFTP does it: is it a bug or a feature? Standard FTP does not kill the null lines...
Null lines vanished after PUT
Re: Null lines vanished after PUT
Co:Z SFTP uses the z/OS C/C++ library for data set I/O, and that library has some odd behavior when it comes to zero-length records.
What you can do to work-around this problem is to do this in your shell script before invoking cozsftp:
export _EDC_ZERO_RECLEN=Y
(watch the case and underscores... must match exactly).
We really should be setting this automatically in Co:Z SFTP. I expect that we will fix this in a subsequent release.
Since you are an Enterprise Support customer, please open a support ticket if you need further assistance.
What you can do to work-around this problem is to do this in your shell script before invoking cozsftp:
export _EDC_ZERO_RECLEN=Y
(watch the case and underscores... must match exactly).
We really should be setting this automatically in Co:Z SFTP. I expect that we will fix this in a subsequent release.
Since you are an Enterprise Support customer, please open a support ticket if you need further assistance.
Re: Null lines vanished after PUT
Thank you very much, this really works.