Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: "Hein, Nashua NH" <heinvandenheuvel@gmail.com>
Subject: Re: RMS internals?
Date: Tue, 11 Aug 2009 13:51:05 -0700 (PDT)	[thread overview]
Message-ID: <22c754f4-872f-4703-b97a-f107e62a99e9@j21g2000yqe.googlegroups.com> (raw)
In-Reply-To: howard-0E8C00.11094911082009@news.newsguy.com

On Aug 11, 11:09 am, Howard S Shubs <how...@shubs.net> wrote:
>  "Hein, Nashua NH" <heinvandenheu...@gmail.com> wrote:
>

> I'm not sure what you're getting at.  I'm just looking at a simple
> situation of "read it, give the data to the caller".  I'm using $READ
> and $OPEN (and $CLOSE) so I don't have to open the file by hand, which
> would require me to play with ODS-2 myself, I expect.  

Which is just fine for a few MB. For larger volumes and higher
performance requirements you might want double/multy-buffering. RMS
record mode gives that for free, albeit with a 127 block IO size
limitation.

>> Disk $QIOs would be new to me, as well.

Not too tricky, but no need to go there. If you do, skip QIO and go
fro IO_PERFORM :-)

> I'm not seeing $MODIFY in either the System Services Reference or the
> RMS reference.  What is it, please?

Correct. You started with the word 'internal'. :-)
It is an undocumented system service primarily used by the linker/
debugger to switch form the fixed-length 512 image records to the
variable length system table section in the image file.

The (few) option are in RMEDEF.
One of its usages is to change the record format (RFM) on the fly.
If the file is opened for write, and you leave teh new setting, it
will become permanent.
Silly example usage to (potentially) 'fix' a broken backup saveset:

#include <stdio>
#include <rms>
#include <rmedef>
main (int argc, char *argv[])
{
struct FAB      fab;
int             s;
fab = cc$rms_fab;                       /* Make this a real FAB (bid
and bln) */
fab.fab$b_fac = FAB$M_PUT;
fab.fab$l_fna = argv[1];
fab.fab$b_fns = STRLEN( argv[1] );
s = sys$open(&fab);
    if (!(s & 1)) return s;
fab.fab$l_ctx = RME$C_SETRFM;
fab.fab$v_esc = 1;
if (argc > 2) {  sscanf(argv[2], "%d", &fab.fab$w_mrs );
    } else fab.fab$w_mrs = 32256;
fab.fab$b_rfm = FAB$C_FIX;
s=sys$modify(&fab);
    if (!(s & 1)) return s;
return sys$close(&fab);
}


> I'm reading up to 512 blocks at a time, or 3*recordsize rounded up to
> the next block size, whichever is bigger.  

Nice!

> A  256KB read is fairly modest, I figure.

Agreed. The SCSI protocol may still fragment it, but you did the best
you could :-). Out of your hands.

In a different reply Howard wrote:
>  There doesn't seem to be a STREAM CRLF variant. :-D

There is. It is plain 'stream' aka STM.
But be careful... it comes with some surprise semantics (to be RSTS/E
compatible?)

RMS REF MAN: FAB$B_RFM ... "Records are delimited by FF, VT, LF, or CR
LF,
and all leading zeros are ignored."

Hein.





  reply	other threads:[~2009-08-11 20:51 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 13:20 RMS internals? Howard S Shubs
2009-08-07 14:04 ` Bob Koehler
2009-08-07 14:09   ` Howard S Shubs
2009-08-07 14:25     ` R.A.Omond
2009-08-07 17:29     ` Graham Burley
2009-08-08 16:07       ` Howard S Shubs
2009-08-07 15:06 ` Malcolm Dunnett
2009-08-07 15:36   ` Richard B. Gilbert
2009-08-07 15:46     ` IanMiller
2009-08-07 17:57       ` JF Mezei
2009-08-08 11:32     ` VAXman-
2009-08-07 17:07   ` Bob Koehler
2009-08-07 18:24     ` Malcolm Dunnett
2009-08-07 21:35     ` P. Sture
2009-08-08 16:16     ` Howard S Shubs
2009-08-08 17:42       ` JF Mezei
2009-08-08 17:57         ` Howard S Shubs
2009-08-10 12:41           ` Bob Koehler
2009-08-10 14:11             ` Howard S Shubs
2009-08-10 14:49               ` Hein, Nashua NH
2009-08-11 15:09                 ` Howard S Shubs
2009-08-11 20:51                   ` Hein, Nashua NH [this message]
2009-08-24 15:49                     ` P. Sture
2009-08-10 21:02               ` Bob Koehler
2009-08-11 14:58                 ` Howard S Shubs
2009-08-10 22:34             ` Arne Vajhøj
2009-08-10 22:39               ` Arne Vajhøj
2009-08-11 15:26                 ` Howard S Shubs
2009-08-12  1:06                   ` Arne Vajhøj
2009-08-10 22:43               ` glen herrmannsfeldt
2009-08-10 22:56                 ` Arne Vajhøj
2009-08-11  2:58               ` Richard B. Gilbert
2009-08-11  4:05                 ` glen herrmannsfeldt
2009-08-11 18:02                   ` P. Sture
2009-08-11 13:00                 ` Bob Koehler
2009-08-11 13:36                   ` Richard B. Gilbert
2009-08-11 15:29                     ` Howard S Shubs
2009-08-11 17:17                       ` Richard B. Gilbert
2009-08-12  3:04                         ` Howard S Shubs
2009-08-11 17:04                     ` Bob Koehler
2009-08-12 16:45                     ` Michael Moroney
2009-08-11 18:38                   ` glen herrmannsfeldt
2009-08-11 18:55                     ` Al Kossow
2009-08-11 19:30                       ` Richard B. Gilbert
2009-08-11 19:55                         ` glen herrmannsfeldt
2009-08-11 19:46                       ` glen herrmannsfeldt
2009-08-12 13:40                       ` Bob Koehler
2009-08-12 13:44                       ` Bob Koehler
2009-08-12 13:39                     ` Bob Koehler
2009-08-12 17:55                       ` glen herrmannsfeldt
2009-08-12  1:00                 ` Arne Vajhøj
2009-08-08 17:52       ` Arne Vajhøj
2009-08-08 18:03         ` Howard S Shubs
2009-08-08 18:26           ` Arne Vajhøj
2009-08-08 18:38             ` JF Mezei
2009-08-09  2:14               ` Howard S Shubs
2009-08-09  2:35                 ` glen herrmannsfeldt
2009-08-09  7:11                   ` Howard S Shubs
2009-08-10 12:44                   ` Bob Koehler
2009-08-10 13:57                     ` Richard B. Gilbert
2009-08-10 18:47                       ` glen herrmannsfeldt
2009-08-10 21:00                       ` Bob Koehler
2009-08-10 18:32                     ` glen herrmannsfeldt
2009-08-10 20:35                       ` Rich Alderson
2009-08-10 21:32                       ` Stefaan A Eeckels
2009-08-09  4:08                 ` JF Mezei
2009-08-09  7:14                   ` Howard S Shubs
2009-08-09 17:21                     ` Michael Moroney
2009-08-10  6:02                       ` Howard S Shubs
2009-08-09  9:23                   ` R.A.Omond
2009-08-10 16:07                     ` P. Sture
2009-08-10 21:04                     ` Bob Koehler
2009-08-09  1:59             ` Howard S Shubs
2009-08-10  2:11               ` Arne Vajhøj
2009-08-10  6:00                 ` Howard S Shubs
2009-08-10 22:33                   ` Arne Vajhøj
2009-08-11 15:13                     ` Howard S Shubs
2009-08-11 17:08                     ` Bob Koehler
2009-08-12  3:18                       ` Howard S Shubs
2009-08-13 16:05                         ` P. Sture
2009-08-14  1:13                           ` Howard S Shubs
2009-08-12 14:21                     ` Bob Koehler
2009-08-10 15:57           ` P. Sture
2009-08-11 15:16             ` Howard S Shubs
2009-08-10 12:38       ` Bob Koehler
2009-08-10 17:10         ` JF Mezei
2009-08-10 21:06           ` Bob Koehler
2009-08-10 22:59           ` Michael Moroney
2009-08-11 15:23             ` Howard S Shubs
2009-08-11 17:12               ` Bob Koehler
2009-08-11 15:22           ` Howard S Shubs
2009-08-10 22:27         ` Arne Vajhøj
2009-08-07 19:28   ` Alan Frisbie
2009-08-08 16:20     ` Howard S Shubs
2009-08-07 21:27   ` P. Sture
2009-08-08 16:08   ` Howard S Shubs
2009-08-09 13:14   ` Hein, Nashua NH
2009-08-09 14:50     ` Hein, Nashua NH
2009-08-09 16:53       ` Howard S Shubs
2009-08-09 17:29         ` Arne Vajhøj
2009-08-10  5:59           ` Howard S Shubs
2009-08-10 22:29             ` Arne Vajhøj
2009-08-11 15:24               ` Howard S Shubs
2009-08-12  1:05                 ` Arne Vajhøj
2009-08-12  3:01                   ` Howard S Shubs
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox