[Info-vax] Fun with file attribrutes

Steven Schweda sms.antinode at gmail.com
Fri Dec 23 19:07:19 EST 2011


> [...] a file that he had received via SFTP. [...]

   As usual, some useful information might be interesting.
For example:

      From where did this file come?

      What were its attributes (if any) there?

      How, exactly was it transferred?

      Software versions?

> [...] This file had the records delimited by ~ characters.

   Not a natural record delimiter on VMS, as you may have
noticed.

> Record format:      Stream, [...]

   Not what I'd've expected from an SFTP operation.

> IOError: [Errno 65535] !ul byte record too large for user's
> buffer: 'test.txt'

   As seen here recently regarding Zip, the C I/O run-time
stuff tends to have more trouble with Stream and Stream_CR
than it does with Stream_LF, especially when there are no
(CR+LF or CR) record delimiters anywhere in the file.

> Huh?  What did I do?  [...]

   Did you forget already?  You said that you changed the
file attributes.  I believe you.  The behavior of the C I/O
run-time stuff depends on these file attributes.  (More than
it should, I suspect.)  As seen in the Zip case, there seem
to be ways to code around the undesirable behavior, but,
because Stream and Stream_CR files with no regular record
delimiters are so uncommon, the problem apparently seldom
arises.



More information about the Info-vax mailing list