[Info-vax] Portable OpenVMS binary data format?

Louis Krupp lkrupp at nospam.pssw.com.invalid
Wed Aug 8 00:24:14 EDT 2018


On Tue, 7 Aug 2018 20:47:18 -0400, Arne Vajhøj <arne at vajhoej.dk>
wrote:

>On 8/6/2018 10:56 PM, Steven Schweda wrote:
>>> [...] FORM='UNFORMATTED',RECORDTYPE='STREAM_LF')
>> 
>>     And what happens when "0x0A" appears in the (binary) data?
>
>What is expected.
>
>It works like:
>* write text file on VMS with LF termination
>* read file as binary on *nix/Windows explicit reading the LF into an 
>INTEGER*1
>
>No problem no matter how many 0x0A's there are.

When there's a 0x0A in the middle of the binary data, you'd have a
file you could write, but not read, on VMS.

This might not be the end of the world, but I think I prefer Steven's
fixed-length records.

(It should be possible to call a C function to write() the data with
no line terminators. For enhanced weirdness, memory-map the data array
to the file on both VMS and Linux -- no file format, no record size,
nothing. Just data.)

Louis



More information about the Info-vax mailing list