[Info-vax] BASIC : Updating a sequential file causes run time error SIZRECINV (156)

Jan-Erik Soderholm jan-erik.soderholm at telia.com
Fri Jun 3 04:07:14 EDT 2016


Den 2016-06-03 kl. 10:03, skrev Robert Nelson:
> Hello all
> I am trying to update a sequential file with variable record lengths and get the error 156 (SIZRECINV).
>
> Here are the details.
>
> 1. Opened file like so
>    OPEN MYFILE FOR INPUT AS FILE #100% &
>    ORGANIZATION SEQUENTIAL, RECORDTYPE ANY, ACCESS UPDATE, ALLOW NONE
>
>    File opened successfully.
>
> 2. read successfully
>    GET #100%
>    MOVE FROM #100%, MYREC=RECOUNT
>
>
> 3. TEST_STR = "1234"
>    NEWLEN = LEN(MYREC) + LEN(TEST_STR)
>
> 4. Update fails
>    MOVE TO #100%, MYREC, TEST_STR
>    UPDATE #100%, COUNT NEWLEN
>
> I get the error when I attempt to perform the update.
>
> Any ideas?
>
> Thanks
>
>


SIZRECINV, Size of record invalid (ERR=156)

   Explanation: The program contains a COUNT or RECORDSIZE
   specification that is invalid because:

     - COUNT equals zero.
     - COUNT exceeds the maximum size of the record.
     - COUNT conflicts with the actual size of the current record
           during a sequential file UPDATE on disk.
     - COUNT does not equal the record size for fixed format records.
     - You specified a record size in the OPEN statement that was
       unequal to the actual record size established when the file
       was created.


User Action: Supply a valid COUNT value in the PUT or UPDATE statement
or a valid RECORDSIZE in the OPEN statement, whichever is applicable.





More information about the Info-vax mailing list