<<< ISVNET::DISK$OTHER:[NOTES$LIBRARY]VMS.NOTE;1 >>> -< VMS Operating System >- ================================================================================ Note 307.3 Undelete utility? 3 of 4 XLIB::SCHAFER "Mark Schafer, ISV Tech. Support" 47 lines 16-DEC-1991 16:35 -< small bug that was reported in RECOVER code >- -------------------------------------------------------------------------------- When recovering a multi-header file, no checks are made to see if the first header found for the file in INDEXF.SYS is in fact the primary header. The RECOVER code recovers all headers subsequent from the one that is selected, but will leave any previous headers deleted. The following changes to the source code alleviate the problem. Also, for those like myself who are not regular Fortran users, when compiling the code you need the /EXT switch for the Fortran compiler. Adrian Leate South U.K. Regional Technical Group -------------------------------------------------------------------- ! FILE HEADER DATA BYTE RECORD(512) INTEGER*2 INFID(3),EXTFID(3),BAKFID(3),FILID(3),CHKSUM,SEGNUM INTEGER*4 FILCHR ------ 0 EQUIVALENCE ( FILID(1), RECORD(9) ), ! MAKE IT EASY TO READ 1 (EXTFID(1), RECORD(15)), ! FROM THE HEADER 2 ( FILCHR, RECORD(53)), 3 (BAKFID(1), RECORD(67)), 4 ( CHKSUM,RECORD(511)), 5 ( SEGNUM, RECORD(5) ) - ----------------------- ------------------------------------------------------------------- ! SEARCH ALL HEADERS UNTIL ONE WITH THE SAME FILE NAME AND VERSION IS FOUND VBN=HEADRS 100 VBN=VBN+1 READ(1,REC=VBN,ERR=130,IOSTAT=IOST) RECORD CALL GETNAM(RECORD,RECNAM) LENCHK=INDEX(RECNAM,';')-1 IF (FILVER.GT.0.OR.LENCHK.LE.0) LENCHK=86 IF (FILNAM.NE.RECNAM(1:LENCHK).OR.SEGNUM.GT.0) GOTO 100 -------------- -------------------------------------------------------------------