       SUBROUTINE ADD_SKIP_TAPE(N)
C
C----------------------------------------------------------------------
C
C.IDENTIFICATION: Subroutine ADD_SKIP_TAPE(n)                
C.LIBRARY:        FOTLIB
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 31 May 94 - inserted in libary (from saxfotlib.inc)
C.PURPOSE:        generate system-dependent command to skip FOT tape files
C.METHOD:         write commands to file temp.com to skip files
C.SYNTAX:         CALL ADD_END(n)                  
C
C.PARAMETERS:     INTEGER N : number of files to be skipped
C.RESTRICTIONS:   uses logical unit 2
C.NOTES:          this is provisional (error handling, management)      
C.FILES:          none
C.REFERENCES:     EDIT_CMD in FOTLIB + to be filled
C
C----------------------------------------------------------------------
C
C      this subroutine writes to the file temp.com :
C      the command necessary to skip N files forward on the tape
C      we assume that such command has been read from a
C      tapecap file and is in the form A $N B 
C
C      e.g. Unix :  mt fsf $N -f /dev/tapedrive
C           VMS  :  SET MAGTAPE/SKIP=FILES:$N tapedrive
C
       INTEGER      IERR,N
       CHARACTER*4  SKIPS 
       INCLUDE 'saxfot.inc'
C
C-->   if n.le.0 or n.gt.9999 commissioning error
C
       WRITE(SKIPS,'(I4.4)')N
C
C      replace token $N with the number of files to be skipped
C-->   provisionally ignore any i/o error !!!
       CMD=MESSAGE
       CALL EDIT_CMD(CMD,'$f','Skipping '//SKIPS//' files...')
       WRITE(2,'(A)',IOSTAT=IERR)CMD
       CMD=SKIP
       CALL EDIT_CMD(CMD,'$t', TAPE )
       CALL EDIT_CMD(CMD,'$n',SKIPS )
       WRITE(2,'(A)',IOSTAT=IERR)CMD
       RETURN
       END
