C-----------------------------------------------------------------------
      SUBROUTINE BAWRITE(LU,IB,NB,KA,A)
C$$$  SUBPROGRAM DOCUMENTATION BLOCK
C
C SUBPROGRAM: BAWRITE        BYTE-ADDRESSABLE WRITE
C   PRGMMR: IREDELL          ORG: W/NMC23     DATE: 94-04-01
C
C ABSTRACT: WRITE A GIVEN NUMBER OF BYTES TO AN UNBLOCKED FILE,
C   SKIPPING A GIVEN NUMBER OF BYTES.
C
C PROGRAM HISTORY LOG:
C   94-04-01  IREDELL
C   95-10-16  IREDELL     WORKSTATION VERSION
C
C USAGE:    CALL BAWRITE(LU,IB,NB,KA,A)
C   INPUT ARGUMENTS:
C     LU           INTEGER UNIT TO WRITE
C     IB           INTEGER NUMBER OF BYTES TO SKIP
C     NB           INTEGER NUMBER OF BYTES TO WRITE
C     A            CHARACTER*1 (NB) BUFFER READ
C   OUTPUT ARGUMENTS:
C     KA           INTEGER NUMBER OF BYTES ACTUALLY WRITTEN
C
C SUBPROGRAMS CALLED:
C   FSEEK        SET FILE POSITION
C   FPUTC        READ BYTE FROM FILE
C
C ATTRIBUTES:
C   LANGUAGE: FORTRAN 77
C   MACHINE: WORKSTATIONS
C
C$$$
      CHARACTER*1 A(NB)
      INTEGER FSEEK,FPUTC
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KA=0
      IF(FSEEK(LU,IB,0).EQ.0) THEN
        DOWHILE(KA.LT.NB.AND.FPUTC(LU,A(KA+1)).EQ.0)
          KA=KA+1
        ENDDO
      ENDIF
C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      RETURN
      END
