        subroutine split3(header,argout,sep2,nw)
c
c split a character string in words and put them in vector argout*200
c word separator can be either   blank  .or.  "sep2"
c a.tento 4/02 v.1.1
c a.tento 6/02 v.1.2
c
        implicit none
        character header*(*), sep2*1
        character*200 argout(*)
        integer nw
c
        integer mlength
        parameter (mlength = 200)
        integer inhb, inhe
        dimension inhb(mlength), inhe(mlength)
        integer flag, i, length
        character*1 sep1
        parameter ( sep1 = ' ' )
c
c
        length = len(header)
        flag = 0
        nw = 0
        do 1 i = 1, length
        if(header(i:i) .eq. sep1    .or.    header(i:i) .eq. sep2 ) then
         flag = 0
        else
                if(flag .eq. 0) then
                 nw = nw + 1
                 inhb(nw) = i
                 inhe(nw) = i
                 flag = 1
                else
                 inhe(nw) = i
                endif
        endif
1       continue
c
        do 2 i = 1, nw
        argout(i) = header(inhb(i):inhe(i))
2       continue
c
c
        return
c
        end
