SUBROUTINE CHKCAB(BLOCK,ARG,FILNAM) C C This subroutine compares a checksum received as an C input argument with one generated in the subroutine. C If they do not match, an error message is produced. C INTEGER BLOCK(256),SUM,ARG ! BYTE FILNAM(40),FILE(40) !Input filename. C CALL ERRSET(70,,.FALSE.,,.FALSE.) !Ignore overflow. SUM=0 ! DO 10 I=1,256 !Compute a checksum SUM=SUM+BLOCK(I) !for 256 words. 10 CONTINUE ! CALL ERRSET(70,,.TRUE.,,.TRUE.) !Recognize overflow. IF(SUM .EQ. ARG) RETURN !Error if they don't match. TYPE 40,FILNAM 40 FORMAT(1X,'CAB -- CHECKSUM ERROR IN ',40A1) RETURN ! END