[Info-vax] BASIC : Updating a sequential file causes run time error SIZRECINV (156)
Dirk Munk
munk at home.nl
Fri Jun 3 06:54:09 EDT 2016
Paul Sture wrote:
> On 2016-06-03, Robert Nelson <26212714h at gmail.com> wrote:
>>
>>> User Action: Supply a valid COUNT value in the PUT or UPDATE statement
>>> or a valid RECORDSIZE in the OPEN statement, whichever is applicable.
>>
>> Thanks Jan. I have already read up on this error. I believe I am
>> specifying the new size in the UPDATE clause. As for RECORDSIZE in
>> OPEN, the OPEN statement in the REFERENCE MANUAL states that BASIC
>> retrieves the record size value from the file while opening existing
>> files if not explicitly specified.
>>
>> The file in question will have variable record lengths.
>>
>
> You cannot change the size of a record in a sequential file via an UPDATE.
>
> Think about it:
>
> o - if increasing the size, where does the extra space come from?
> o - if decreasing the size, what happens to the remaining space?
>
> You can change the record size via an update with indexed files, but not
> sequential ones.
>
No you can't, only if the file has been defined with a variable record
size. The same applies to relative files. It has been a long time since
I worked with these kind of files, but I assume you will have to declare
a maximum recordsize when creating the file.
More information about the Info-vax
mailing list