[Info-vax] CRTL and RMS vs SSIO

Dave Froble davef at tsoft-inc.com
Thu Oct 7 20:22:00 EDT 2021


On 10/7/2021 7:15 PM, Craig A. Berry wrote:
>
> On 10/7/21 1:30 PM, Stephen Hoffman wrote:
>> On 2021-10-07 17:16:03 +0000, Dave Froble said:
>
>
>>> I don't use C, so I don't know much about it.  But isn't this
>>> capability already available?
>>
>> The C standard functions—the equivalent of the BASIC calls OPEN, READ,
>> WRITE, et al—are via RMS. There's no knob to tell C "don't do that".
>
> You're pretending that you don't know about the foo="bar" options on the
> CRTL open/fopen/creat calls.  Yes, it's all via RMS, but you can tell it
> to do or not do certain things. And the feature logicals, of course, but
> it might be dinnertime in your time zone and I wouldn't want to give you
> indigestion :-).
>
> But from BASIC, yes, I think you have to write wrappers around the CRTL
> functions and then call them from BASIC, or at least that's what I did
> the one time I had to write stream files from BASIC.

I'd ask, why not call the RMS routines?

No, messing with FABs and RABs and such is not one of my favorite things 
to do.  But it sure is doable.

Now perhaps the naming doesn't mean the same thing, but:

OPEN
   Syntax
                          [ FOR INPUT  ]
          OPEN file-spec1 [ FOR OUTPUT ] AS [ FILE ] chnl-exp1 [,
               open-clause ]...

            open-clause:  {                  { VIRTUAL    } 
      }
                          {                  { UNDEFINED  } 
      }
                          { [ ORGANIZATION ] { INDEXED    } [ STREAM   ] 
      }
                          {                  { SEQUENTIAL } [ VARIABLE ] 
      }
                          {                  { RELATIVE   } [ FIXED    ] 
      }

Basic help seems to imply that stream files can be created ...

Perhaps I should actually try it, much as it entails work ...

Itanic> t zz.bas
1       Open "ZZ.ZZ" For Output as File #1%, &
                 Organization Sequential Stream, &
                 Recordsize 32767

         Print #1%, Num1$(Z%) For Z% = 1% to 5%

         Close #1%

         End
Itanic> t zz.zz
1
2
3
4
5
Itanic> dir/full zz.zz

Directory DKB0:[DFE]

ZZ.ZZ;1                       File ID:  (6678,7,0)
Size:            1/16         Owner:    [DFE]
Created:     7-OCT-2021 20:22:50.29
Modified:    7-OCT-2021 20:22:50.36 (1)
Expires:    <None specified>
Backup:     <No backup recorded>
Effective:  <None specified>
Recording:  <None specified>
Accessed:    7-OCT-2021 20:22:50.29
Attr Mod:    7-OCT-2021 20:22:50.36
Data Mod:    7-OCT-2021 20:22:50.29
Linkcount:  1
File organization:  Sequential
Shelved state:      Online
Caching attribute:  Writethrough
File attributes:    Allocation: 16, Extend: 0, Global buffer count: 0, 
No version limit
Record format:      Stream, maximum 32767 bytes, longest 1 byte
Record attributes:  Carriage return carriage control
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWED, Group:RE, World:
Access Cntrl List:  None
Client attributes:  None

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list