[Info-vax] wrong file format
hb
end.of at inter.net
Wed Dec 30 09:13:50 EST 2020
On 12/30/20 1:59 PM, Dirk Munk wrote:
> Suppose I have a file with binary data, and one byte has the binary
> (ascii) value of <lf>, then Unix will use it as a record separator, even
> if it is in the middle of the actual data of that record.
No. Unix does not know what a record separator is. It's the application
which knows what's in a file and whether an <lf> is a newline and
interpreted as a record separator or just data. And, if you have binary
data you usually do not read with fgets() or any other read function,
which stops reading after a newline.
> Suppose you have a VMS file with fixed record size. That file has no
> records separators what so ever, it is one long stream of data. VMS can
> calculate where the records start and end in the file. Suppose it
> consists out of sets of three records of 100 bytes that belong together.
> Then you can change the attributes of that file to records of 300 bytes,
> and in one read operation you will have all the data that belongs
> together. I've actually used this in the past.
You obviously had even record size and never had the record attribute
BLOCK_SPAN set to "no" (FDL syntax).
More information about the Info-vax
mailing list