.COMMENT FIG3.RNO NAB 28-Nov-84/29-Nov-84. .COMMENT .COMMENT Figure 3 for TAPROL.DOC. .COMMENT .PAPER SIZE 60,72 .NOFILL .NOJUSTIFY .LEFT MARGIN 6 .RIGHT MARGIN 74 .FIGURE 2 .SUBTITLE;######Figure 3, TAPROL.FOR, continued .TEST PAGE 6 .CENTER;Figure 3, TAPROL.FOR. .BLANK PROGRAM TAPROL 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 an ROLLIN disk image from a ROLLIN tape mounted on drive MT0 C to a logical device. The file name of the logical device file is C TAPROL.DSK. The tape structure may be determined with TAPLOG. C The tape may be prepositioned with MTAPE. The MOUNT command may C be used to access the recovered disk image. C C Edit Record: C C 26-Nov-84: Original creation. C 28-Nov-84: Added request for input of the total number of records C to read and zero fill of any short records. C DIMENSION * BUFFER(8192), ! I/O data buffer. * MTUNIT(4) ! tape drive unit name. C INTEGER * BYTCNT, ! number of bytes per tape record. * LUN, ! output device logical unit number. * RCDNO, ! record number in output file. * RDCNT, ! number of bytes read from tape. * READ, ! mag tape read function. * TOTRCD ! total number of tape records to read. C LOGICAL*1 * BUFFER, * MTUNIT C DATA * BYTCNT /8192/, * LUN /30/, * MTUNIT /"115,"124,"060,"000/, * READ /1/ C 1 FORMAT (/,' MTUNIT: 84k28a',//) 2 FORMAT (/,' MTUNIT: All done',//) 10 FORMAT ('+',I6,I6) 11 FORMAT (I5) C TYPE 1 CALL GTLIN (BUFFER,'Enter the number of records to copy') I = LEN (BUFFER) DECODE (I,11,BUFFER) TOTRCD OPEN (ACCESS = 'DIRECT', * MAXREC = TOTRCD, * NAME = 'DK:TAPROL.DSK', * RECORDSIZE = BYTCNT/4, * TYPE = 'NEW', * UNIT = LUN) C DO 100 I = 1,TOTRCD RCDNO = I CALL MTFOR (MTUNIT,READ,BYTCNT,BUFFER,RDCNT) TYPE 10,RCDNO,RDCNT IF (RDCNT .EQ. BYTCNT) GO TO 90 DO 80 J = RDCNT+1,BYTCNT BUFFER(J) = 0 80 CONTINUE 90 CONTINUE IF (RDCNT .EQ. 0) GO TO 110 WRITE (LUN'RCDNO) BUFFER CONTINUE 100 CONTINUE C 110 CONTINUE CLOSE (UNIT=LUN) TYPE 2 CALL EXIT END .SUBTITLE .COMMENT End of file, TAPROL.RNO.