From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: 3717dac89a,a975f64b947c122 X-Google-Attributes: gid3717dac89a,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!j21g2000yqe.googlegroups.com!not-for-mail From: "Hein, Nashua NH" Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: RMS internals? Date: Tue, 11 Aug 2009 13:51:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22c754f4-872f-4703-b97a-f107e62a99e9@j21g2000yqe.googlegroups.com> References: <4a7c4310$1@flight> <0076b30e$0$7155$c3e8da3@news.astraweb.com> <1e27ffb3-e228-450c-aead-22d23950f110@d23g2000vbm.googlegroups.com> NNTP-Posting-Host: 71.181.48.245 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1250023865 30956 127.0.0.1 (11 Aug 2009 20:51:05 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 11 Aug 2009 20:51:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j21g2000yqe.googlegroups.com; posting-host=71.181.48.245; posting-account=U1iMPAoAAAC9r8wm0KaW63EcF8sfjFeH User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.37 Safari/530.5,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.sys.dec:1326 comp.os.vms:20762 On Aug 11, 11:09=A0am, Howard S Shubs wrote: > =A0"Hein, Nashua NH" wrote: > > I'm not sure what you're getting at. =A0I'm just looking at a simple > situation of "read it, give the data to the caller". =A0I'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. =A0 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. =A0What 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 #include #include main (int argc, char *argv[]) { struct FAB fab; int s; fab =3D cc$rms_fab; /* Make this a real FAB (bid and bln) */ fab.fab$b_fac =3D FAB$M_PUT; fab.fab$l_fna =3D argv[1]; fab.fab$b_fns =3D STRLEN( argv[1] ); s =3D sys$open(&fab); if (!(s & 1)) return s; fab.fab$l_ctx =3D RME$C_SETRFM; fab.fab$v_esc =3D 1; if (argc > 2) { sscanf(argv[2], "%d", &fab.fab$w_mrs ); } else fab.fab$w_mrs =3D 32256; fab.fab$b_rfm =3D FAB$C_FIX; s=3Dsys$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. =A0 Nice! >=A0A 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.