.COMMENT FIG1.RNO NAB 28-Nov-84/29-Nov-84. .COMMENT .COMMENT Figure 1 for TAPROL.DOC. .COMMENT .PAPER SIZE 60,72 .NOFILL .NOJUSTIFY .LEFT MARGIN 6 .RIGHT MARGIN 74 .FIGURE 2 .SUBTITLE;######Figure 1, TAPLOG.FOR, continued .TEST PAGE 6 .CENTER;Figure 1, TAPLOG.FOR. .BLANK PROGRAM TAPLOG C C Copyright (C) 1984 NAB Software Services, Inc. .BLANK The copyright owner grants permission to copy this software provided that the above copyright notice is included. This software may not be sold or used in any commercial product. .BLANK C C Author: N. A. Bourgeois, Jr. C C Sample application program for MTLIB. C C Read a magnetic tape and log the record number and the number of C bytes in each record. A count of zero bytes indicates a tape C mark. The tape may be in any arbitrary format and code. The C output is sent to the file, DK:TAPLOG.DAT. The program is C terminated when two consecutive tape marks are encountered. The C tape is assumed to be mounted on device, MT0:. C C Edit record: C C 16-Aug-84: Original creation. C 22-Oct-84: Added copyright notice. C DIMENSION BUFFER(16384), MTUNIT(4) C INTEGER IBRC, IRET, EOFFLG, LUN, RCDNUM, READ, REWIND C LOGICAL*1 BUFFER, MTUNIT C DATA IBRC/16384/, EOFFLG/0/, LUN/30/, RCDNUM/0/, READ/1/, * REWIND/7/ DATA MTUNIT/"115,"124,"060,"000/ C 10 FORMAT (' TAPLOG: 84h29a',/) 12 FORMAT (' Record Byte',/,' Number Count',/) 14 FORMAT (' ',I6,' ',I6) 16 FORMAT ('+',2I6) 18 FORMAT (' TAPLOG: All done',/) C TYPE 10 CALL MTFOR (MTUNIT,REWIND) OPEN (ACCESS='SEQUENTIAL',NAME='DK:TAPLOG.DAT',UNIT=LUN) WRITE (LUN,12) C 100 CONTINUE RCDNUM = RCDNUM + 1 CALL MTFOR (MTUNIT,READ,IBRC,BUFFER,IRET) TYPE 16,RCDNUM,IRET WRITE (LUN,14) RCDNUM,IRET IF (IRET .GT. 0) EOFFLG = 0 IF (IRET .EQ. 0) EOFFLG = EOFFLG + 1 IF (EOFFLG .EQ. 2) GO TO 110 GO TO 100 C 110 CONTINUE CALL MTFOR (MTUNIT,REWIND) CLOSE (UNIT=LUN) TYPE 18 CALL EXIT C END .SUBTITLE .COMMENT End of file, FIG1.RNO.