PROGRAM COPY1 !I/O EXAMPLE PROGRAM C C PROGRAM PERFORMS FILE-TO-FILE COPY C DOES ONE COPY THEN EXITS C C The following programs are used in the RT-11 User and RT-11 C Programmer self paced instruction courses for RT-11 V4.They are also C similar to programs used in the Programming with RT-11 series for C RT-11 V5.0 or later. The name of the files are as specified in the C self paced course. C C The code is supplied as a service as Digital does not supply these C on diskette. C Any copyright is the property of Digital Equipment Corporartion C C LOGICAL*1 SETUP,CPYRTN !FUNCTIONS RETURN ERROR INDICATOR LOGICAL*1 ERROR C 10 ERROR = SETUP() !GET FILE NAMES, OPEN FILES IF (ERROR) GO TO 20 !IF ERROR, THEN EXIT ERROR = CPYRTN() !EXECUTE COPY ROUTINE IF (ERROR) GO TO 20 !IF BAD COPY, DON'T CLOSE OUTPUT FILE CALL CLSCHN !IF GOOD COPY, CLOSE CHANNELS 20 CALL EXIT END