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

Neil Rieck n.rieck at sympatico.ca
Tue Jun 7 07:30:09 EDT 2016


On Friday, June 3, 2016 at 4:03:25 AM UTC-4, Robert Nelson wrote:
> 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

Wow. Some old-school programming here since I haven't seen anyone use "MOVE FROM" or "MOVE TO" since the VAX days. Even then, DEC recommended that everyone use a map reference in the open statement.

In your case, "LINPUT #100, junk$" and "PRINT #100, junk$" might be better alternatives.

Neil Rieck
Waterloo, Ontario, Canada. 
http://www3.sympatico.ca/n.rieck/demo_vms_html/openvms_demo_index.html#fileio
 



More information about the Info-vax mailing list