[Info-vax] Portable OpenVMS binary data format?
Arne Vajhøj
arne at vajhoej.dk
Wed Aug 8 20:31:11 EDT 2018
On 8/8/2018 12:24 AM, Louis Krupp wrote:
> 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.
That is true.
(until VMS get ACCESS='STREAM')
That is a downside.
> This might not be the end of the world, but I think I prefer Steven's
> fixed-length records.
I also provided a fixed length example.
Downsides of that is padding and the need for some conventions.
> (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.)
DIY ACCESS='STREAM'.
:-)
Arne
More information about the Info-vax
mailing list