        PROGRAM ZFTEST
        IMPLICIT INTEGER*4 (A-Z)

        INCLUDE '($IODEF)'

        INTEGER*2 CHAN, IOSB(4)

        STATUS = SYS$ASSIGN ('ZFA0', CHAN, , )
        IF (.NOT. STATUS) CALL LIB$STOP (%VAL(STATUS))

        STATUS = SYS$QIOW (%VAL(EFN), %VAL(CHAN), %VAL(IO$_CREATE),
        1               IOSB, , , BUFFER, %VAL(512), , , , )
        IF (.NOT. STATUS) CALL LIB$STOP (%VAL(STATUS))
        IF (.NOT. IOSB(1)) CALL LIB$STOP (%VAL(IOSB(1)))
        TYPE *, '"File" is "open"'

        DO I = 1, 100
                STATUS = SYS$QIOW (%VAL(EFN), %VAL(CHAN), 
        1                       %VAL(IO$_WRITEVBLK), IOSB, , , 
        1                       BUFFER, %VAL(512), , , , )
                IF (.NOT. STATUS) CALL LIB$STOP (%VAL(STATUS))
                IF (.NOT. IOSB(1)) CALL LIB$STOP (%VAL(IOSB(1)))
        ENDDO
        TYPE *, '100 writes completed'

        STATUS = SYS$QIOW (%VAL(EFN), %VAL(CHAN), %VAL(IO$_WRITEOF),
        1               IOSB, , , BUFFER, %VAL(512), , , , )
        IF (.NOT. STATUS) CALL LIB$STOP (%VAL(STATUS))
        TYPE *, '"File" is "closed"'

        END
