[Info-vax] wrong file format
Hein RMS van den Heuvel
heinvandenheuvel at gmail.com
Mon Jan 4 12:34:38 EST 2021
On Sunday, January 3, 2021 at 6:42:44 PM UTC-5, Dirk Munk wrote:
> Hein RMS van den Heuvel wrote:
> > On Saturday, January 2, 2021 at 11:01:12 PM UTC-5, Craig A. Berry wrote:
> >> On 1/2/21 8:04 PM, Arne Vajhøj wrote:
> >>> On 12/31/2020 10:54 PM, Bill Gunshannon wrote:
> >
> >>> * the traditional story is that all language RTL IO goes
> >>> through RMS - including C RTL (even though that one
> >>> supposedly is a bit more complicated than other
> >>> languages)
> >
> > Last century, yes.
> > Today for the simple sequential file COBRTL, CRTL and SORT switched away from record IO to roll their own with BlockIO ($READ, $WRITE).
> > I don't recall them doing direct $QIO calls. BlockIO is a tiny layer over QIO adding error handling mostly.
> > Record IO is way to expensive for high volume IO - going in and out of exec mode 'all the time', probing the argument blocks and buffers and so on.
> > Block IO incurs this overhead typically much less frequently to the point where it does not really matter ( 10 ... 50 times less is my guess).
> >
> > It's all easy enough to verify for your exact situation with a tiny program doing the IO calls you would like to understand.
> > Code in a pause after a few IOs and activate ANALYZE /SYSTEM ... SET PROC ... SHOW PROC/RMS=(RAB,FAB,BDBSUM[,IFAB,IRAB,FSB])
> >
> > Hein
> >
> That switch must have been a long time ago for COBRTL. As long as I can
> remember COBOL on RSX and VMS had the "reserve nn areas" in the File
> control paragraph of the Input-output section of the Environment
> division. to speed up file access, and that made IO much faster. As far
> as I know that clause reserved nn blocks for that file.
Oh boy, we sure know how to divert and drag on a discussion huh. :-)
BLOCK CONTAINS ---> MBC --> Multi Block Count
RESERVE AREAS --> MBF --> Multi Buffer Count.
Both are specific to RMS Record IO, not directly applicable for BlockIO.
If not specified defaults as per SHOW RMS are used.
Applications can (and some do) of course use GETJPI/GETSYI to also listen to SET RMS requests.
Actually I just ran a few quick test on EISNER ( VSI COBOL V3.1-0007 on OpenVMS Alpha V8.4-2L2 )
I cannot get Cobol to use BlockIO for Read, only for WRITE.
SDA> show proc/rms=(rab,fab,bdbsum)
Read:
FAC: 42 GET,BRO
ROP: 00101600 RAH,WBH,CDK,NLK
BDBSUM:
Address USERS SIZE NUMB VBN
7B077600 0 00007600 00007600 00000001 ! Used: BLOCK CONTAINS 30000 CHARACTERS,
7B079D70 0 00007600 00007600 0000003C ! Read Ahead already filled this after reading the first record
:
As many buffers as MBF (RESERVE X AREAS) requested or process/system default if MBF=0.
Note: if you test this on a small file, the buffer size is maxed out by file size!
Write:
FAC: 61 PUT,BIO,BRO
ROP: 00001E00 RAH,WBH,BIO,CDK
RFA: 00000000,0000
BDBSUM:
Address USERS SIZE
7B079D70 0 00000000 ! Only 1 faked out buffer - no bytes - RESERVE x AREAS not visible here.
Cheers,
Hein
More information about the Info-vax
mailing list