[Info-vax] CRTL and RMS vs SSIO

Craig A. Berry craigberry at nospam.mac.com
Thu Oct 7 12:01:37 EDT 2021


On 10/7/21 9:42 AM, Arne Vajhøj wrote:
> On 10/7/2021 9:34 AM, Arne Vajhøj wrote:
>>          fseek(fp, ix, SEEK_SET);
> 
>> var.txt size = 14 bytes
>> var.txt sequential read (text): 1=41 2=0A 3=42 4=42 5=0A 6=43 7=43 
>> 8=43 9=0A
>> var.txt sequential read (binary): 1=41 2=42 3=42 4=43 5=43 6=43
>> var.txt direct read (text): 1=41 2=-1 3=02 4=-1 5=42 6=-1 7=-1 8=-1 
>> 9=43 10=-1 11=-1 12=-1 13=FF 14=-1
>> var.txt direct read (binary): 1=41 2=-1 3=02 4=-1 5=42 6=-1 7=-1 8=-1 
>> 9=43 10=-1 11=-1 12=-1 13=FF 14=-1
>> $ mcr sys$disk:[]process stmlf.txt
>> stmlf.txt size = 9 bytes
>> stmlf.txt sequential read (text): 1=41 2=0A 3=42 4=42 5=0A 6=43 7=43 
>> 8=43 9=0A
>> stmlf.txt sequential read (binary): 1=41 2=0A 3=42 4=42 5=0A 6=43 7=43 
>> 8=43 9=0A
>> stmlf.txt direct read (text): 1=41 2=0A 3=42 4=42 5=0A 6=43 7=43 8=43 
>> 9=0A
>> stmlf.txt direct read (binary): 1=41 2=0A 3=42 4=42 5=0A 6=43 7=43 
>> 8=43 9=0A
> 
> In all fairness then I believe there are some documentation
> somewhere that states that fseek is only supported to
> beginning of a record. I cannot find it right now,
> but I believe I once saw it somewhere.

Is this what you're looking for?

$ help crtl fseek description

CRTL

   fseek

     Description

          The fseek function can position a fixed-length record-access
          file with no carriage control or a stream-access file on any
          byte offset, but can position all other files only on record
          boundaries.

          The available Standard I/O functions position a variable-length
          or VFC record file at its first byte, at the end-of-file, or on
          a record boundary. Therefore, the arguments given to fseek must
          specify any of the following:

          o  The beginning or end of the file

          o  A 0 offset from the current position (an arbitrary record
             boundary)

          o  The position returned by a previous, valid ftell call





More information about the Info-vax mailing list