[Info-vax] Streaming a File on OpenVMS with Caché

George Cornelius gcornelius at charter.net
Sat Jan 17 07:03:24 EST 2015


On 01/14/2015 09:50 PM, Mack Altman III wrote:

> The %Stream class within Cache opens the file into memory,
> which can be read and evaluated to later be written to disk.

>The issue we experience is even with the line terminator set
>to CR,LF the line is broken when the variable length is reached.
>VMS is enforcing a line termination; although, there isn't one
>within the file.

>I consider myself a pretty savvy "Googler", which is why
>after finding nothing about enforcing a file type or
>modifying it without err I reached out to the group.
>The main problem I experience with both OpenVMS and
>Cache are they are very small in regards to the size
>of the community of developers out there.

I support VMS on a system that has both.

My experience with Intersystems is quite
old, however, and does not extend into
this level of interaction with the O/S.

When I saw your post, I was beginning to
wonder if you may represent an organization
which is converting some files for us.  I
had suggested to the person doing the
exports that great care was required if
the data was being created on a VMS system
and then read on on Unix or Windows.

Note that I have done a lot under DSM with
file format conversions, but DSM was
designed with help from VMS Engineering and
has fine-grained control of VMS file
attributes.

 From a $ DUMP/BLOCK=COUNT:n of the file, does it
look like the records start with a 16 bit count?

Or do you you see perfectly good stream data
with some terminator like <LF> or <CR><LF>?

The counted format is called the VARIABLE
record type.  The others are STREAM* types.

Remember that the hexadecimal reads right
to left on a VMS memory dump, so that little
endian data values interpreted as, say 16-,
32-, or 64-bit numbers appear the way we
expect them to, low order byte on the far
RH end of the number.

Note that you can have both VARIABLE format _and_
embedded carriage control - although I do not
encounter this much these days.  It was
typically included in things meant to go to
a printer, like compiler listings.

If it came from a Unix system, you can try

  $ SET FILE/ATTRIB=rfm:stmlf FNAME ! stream-linefeed

If you think it is truly stream format (<CR><LF>
terminator, etc.), try stm instead of stmlf.

You may have to set record size as well to avoid
further problems, e.g.,

  $ SET FILE/ATTRIB=(mrs:32767,lrl:32767) ...

Don't do these things with your only copy of the
file.

Finally, there are various ways to completely
garble the data during an ftp transfer.  Used to
be that Multinet would do some really odd things
when sending VARIABLE format as binary, at least
when sent to a non-Multinet ftp client or server
at the other end.

-- 
Can the spam



More information about the Info-vax mailing list