!
if pro%narg.eq.0 then
  SAY " @ all-find  [FileFilter  [Threshold]]"
  say " "
  say " find the wide-bands spectral line data among the UV tables "
  say "    matching the FileFilter in the directory specified by "
  if exist(all%raw) then
    say "      all%raw [ "'all%raw'" ] "
  else
    say "      all%raw [ ]    (all%raw is currently undefined)"
  endif
  say "    and return them in all%wide file list."
  say "      Threshold is the minimum bandwidth in MHz (default 500)"
  say " "
  if .not.exist(ALL%WIDE) then
    say "No current list of wide-band UV tables"
    say "Use   @ all-find *  [Threshold]      to build it"
  else
    say " "
    say "Current list of wide-band UV tables:"
    exa all%wide
  endif
else
  if exist(all%wide) delete /var all%wide all%wband
  define char*64 sname
  define double mband
  define double base_a0 base_d0
  define char*12 base_name
  define integer check_fail
  !
  if pro%narg.ge.2 then
    let mband &2
  else if exist(all%minband) then
    if (all%minband.ne.0) then
      let mband all%minband ! MHz
    else
      let mband 250 ! MHz
    endif
  else 
    let mband 250  ! MHz
  endif
  if file(all%raw) then
    SAY "Searching in "'all%raw'
    sic find &1.uvt 'all%raw'
    define char sdir*64
    let sdir 'all%raw'
  else
    define char sdir*4
    let sdir " "
    sic find &1.uvt
  endif
  defin integer nfound
  defin double band
  let nfound 0
  for i 1 to dir%nfile 
    define head a 'sdir''dir%file[i]' read
    if (i.eq.1) then
      let base_a0 a%a0
      let base_d0 a%d0
      let base_name 'a%source'
    else if (base_name.ne.a%source) then
      message e PIPELINE "Source name mis-match: expected "'base_name'", got "'a%source'
      check_fail = 1
    else 
      if (base_a0.ne.a%a0) then
        message e PIPELINE "Source position mis-match: expected A0 "'base_a0'", got "'a%a0'
        check_fail = -1
      endif
      if (base_d0.ne.a%d0) then
        message w PIPELINE "Source position mis-match: expected D0 "'base_d0'", got "'a%d0'
        check_fail = -1
      endif
    endif
    !
    let band abs(a%nchan*a%freqres)
    if (band.gt.mband) then
      sic parse 'dir%file[i]' sname
      if (nfound.eq.0) then
        let nfound = 1
        define char*64 all%wide[nfound] /global
        define real all%wband[nfound] /global        
        let all%wide 'sname'
        let all%wband band
      else
        define char*64 cfound[nfound]
        define real bfound[nfound]
        for j 1 to nfound
          let cfound[j] 'all%wide[j]'
          let bfound[j] all%wband[j]
        next
        delet /var all%wide all%wband
        let nfound nfound+1
        define chara*64 all%wide[nfound] /global
        define real all%wband[nfound] /global        
        for j 1 to nfound-1
          let all%wide[j] 'cfound[j]'
          let all%wband[j] bfound[j]
        next
        let all%wide[nfound] 'sname'
        let all%wband[nfound] band
        delete /var cfound bfound
      endif
      say "Found "'sname'" -- band = "'band'
    endif
    delet /var a
  next
  if (check_fail.ne.0) then
    say 'ansi%red'"E-ALL, Single source verification failed "'ansi%none'
    say 'ansi%blue'"I-ALL, Please specify an appropriate file filter; current one is all%filter = "'all%filter''ansi%none'
    let all%next "ERROR"
  else
    let all%next "NEXT"
  endif
endif
