1 SUB Get_Record_for_Update(INTEGER Lun, & STRING Input_Record, & INTEGER Character_Count, & LONG Istatus) ! ! This subroutine gets the next sequential in the file opened ! by Open_for_Updare on LUN, and returns it and the number ! of characters in the record to the calling routine in Input_Record. ! All I/O to the file opened by Open_for_Update must be done ! via the BASIC I/O system. ! ! CALL Get_Record(LUN, Input_Record, Character_count, Istatus) ! Where: ! LUN I*2 BASIC LUN for I/O ! Input_Record C*512 The input record. ! Character_count I*2 The number of characters returned ! Istatus I*4 Error status. ! =1 Success ! >1 BASIC error code ! ! Written by: ! James G. Downward ! KMS Fusion, Inc. ! PO, Box 1567 ! Ann Arbor, Mich. 48106 ! 10-Jan-1982 ! 10 %IDENT "1" ! MAP (Record_buf0) STRING In_Rec=512 ! ONERROR GOTO 1000 ! GET #LUN ! Get the record Character_Count=RECOUNT ! Set char count Input_Record=In_Rec ! Transfer data Istatus=1 ! Show success SUBEXIT ! Done 1000 Istatus=ERR ! Show open error IF ERR <> 11 THEN ! IF not EOF report error PRINT "VPW_Get_Record -- Error reading record" PRINT " BASIC Error #";ERR PRINT " BASIC error message: ";ERT$(ERR) END IF ! Istatus=11 ! RESUME 2000 ! 2000 SUBEXIT ! 9999 SUBEND