anchor.diff:      end if
       call chr_cast(lnSplit(2), dist_beamSpread, cErr)
   
  +  case("FILL")
  +    if(nSplit < 3) then
  +      write(lerr,"(a,i0)") "DIST> ERROR FILL takes at least 3 argument, got ",nSplit-1
  +      iErr = .true.
  +      return
  +    end if
  +    call dist_parseFill(lnSplit, nSplit, iErr)
  +
  +  case default
  +    write(lerr,"(a)") "DIST> ERROR Unknown keyword '"//trim(lnSplit(1))//"'."
  +    iErr = .true.
  +    return
  +
     end select
   
     if(cErr) then
  
positive.code: !    This routine splits the unit from the format description and adds the format and the scaling
  !  factor to the list of format columns for later file parsing.
  ! ================================================================================================ !
  subroutine dist_setColumnFormat(fmtName, fErr)
  
    use crcoall
    use string_tools
  
negative.code:   select case(chr_toUpper(fmtBase))
  
    case("OFF","SKIP")
      fmtID = dist_fmtNONE
    case("ID")
      fmtID = dist_fmtPartID
    case("PARENT")
      fmtID  = dist_fmtParentID
  
    case("X")
      call dist_unitScale(fmtName, fmtUnit, 1, fmtFac, fErr)
      fmtID  = dist_fmtX
      fmtCol = 1
    case("Y")
      call dist_unitScale(fmtName, fmtUnit, 1, fmtFac, fErr)
      fmtID  = dist_fmtY
      fmtCol = 3
  
    case("XP")
      fmtID  = dist_fmtXP
      fmtCol = 2
    case("YP")
      fmtID  = dist_fmtYP
      fmtCol = 4
  
    case("PX")
      call dist_unitScale(fmtName, fmtUnit, 3, fmtFac, fErr)
      fmtID  = dist_fmtPX
      fmtCol = 2
    case("PY")
      call dist_unitScale(fmtName, fmtUnit, 3, fmtFac, fErr)
      fmtID  = dist_fmtPY
      fmtCol = 4
  
    case("PX/P0","PXP0")
      fmtID  = dist_fmtPX
      fmtCol = 2
    case("PY/P0","PYP0")
      fmtID  = dist_fmtPY
      fmtCol = 4
  
    case("SIGMA")
      call dist_unitScale(fmtName, fmtUnit, 1, fmtFac, fErr)
      fmtID  = dist_fmtSIGMA
      fmtCol = 5
    case("ZETA")
      call dist_unitScale(fmtName, fmtUnit, 1, fmtFac, fErr)
      fmtID  = dist_fmtZETA
      fmtCol = 5
    case("DT")
      call dist_unitScale(fmtName, fmtUnit, 4, fmtFac, fErr)
      fmtID  = dist_fmtDT
      fmtCol = 5
  
    case("E")
      call dist_unitScale(fmtName, fmtUnit, 3, fmtFac, fErr)
      fmtID  = dist_fmtE
      fmtCol = 6
    case("P")
      call dist_unitScale(fmtName, fmtUnit, 3, fmtFac, fErr)
      fmtID  = dist_fmtP
      fmtCol = 6
    case("DE/E0","DEE0")
      fmtID  = dist_fmtDEE0
      fmtCol = 6
    case("DP/P0","DPP0","DELTA")
      fmtID  = dist_fmtDPP0
      fmtCol = 6
    case("DE/P0","DEP0","PT")
      fmtID  = dist_fmtPT
      fmtCol = 6
    case("PSIGMA")
      fmtID  = dist_fmtPSIGMA
      fmtCol = 6
  
    case("XN")
      fmtID  = dist_fmtXN
      fmtCol = 1
      dist_distLib = dist_distLibNorm
    case("YN")
      fmtID  = dist_fmtYN
      fmtCol = 3
      dist_distLib = dist_distLibNorm
    case("ZN")
      fmtID  = dist_fmtZN
      fmtCol = 5
      dist_distLib = dist_distLibNorm
    case("PXN")
      fmtID  = dist_fmtPXN
      fmtCol = 2
      dist_distLib = dist_distLibNorm
    case("PYN")
      fmtID  = dist_fmtPYN
      fmtCol = 4
      dist_distLib = dist_distLibNorm
    case("PZN")
      fmtID  = dist_fmtPZN
      fmtCol = 6
      dist_distLib = dist_distLibNorm
  
    case("JX")
      fmtID  = dist_fmtJX
      fmtCol = 1
      dist_distLib = .true.
    case("JY")
      fmtID  = dist_fmtJY
      fmtCol = 3
      dist_distLib = .true.
    case("JZ")
      fmtID  = dist_fmtJZ
      fmtCol = 5
      dist_distLib = .true.
    case("PHIX")
      call dist_unitScale(fmtName, fmtUnit, 2, fmtFac, fErr)
      fmtID  = dist_fmtPhiX
      fmtCol = 2
      dist_distLib = .true.
    case("PHIY")
      call dist_unitScale(fmtName, fmtUnit, 2, fmtFac, fErr)
      fmtID  = dist_fmtPhiY
      fmtCol = 4
      dist_distLib = .true.
    case("PHIZ")
      call dist_unitScale(fmtName, fmtUnit, 2, fmtFac, fErr)
      fmtID  = dist_fmtPhiZ
      fmtCol = 6
      dist_distLib = .true.
  
    case("MASS","M")
      call dist_unitScale(fmtName, fmtUnit, 3, fmtFac, fErr)
      fmtID  = dist_fmtMASS
    case("CHARGE","Q")
      fmtID  = dist_fmtCHARGE
    case("ION_A")
      fmtID  = dist_fmtIonA
    case("ION_Z")
      fmtID  = dist_fmtIonZ
    case("PDGID")
      fmtID  = dist_fmtPDGID
  
    case("SX")
      fmtID  = dist_fmtSPINX
    case("SY")
      fmtID  = dist_fmtSPINY
    case("SZ")
      fmtID  = dist_fmtSPINZ
  
    case default
      isValid = .false.
      return
  
    end select
  
  #ifndef DISTLIB
    if(dist_distLib) then
      write(lerr,"(a)") "DIST> ERROR Format '"//trim(fmtName)//"' requires SixTrack to be built with DISTLIB enabled"
      fErr = .true.
      return
    end if
  #endif
  
  end subroutine dist_parseColumn
  
  ! ================================================================================================ !
  !  Parse Multi-Column Formats
  !  V.K. Berglyd Olsen, BE-ABP-HSS
  !  Created: 2019-07-05
  !  Updated: 2019-07-10
  ! ================================================================================================ !
  subroutine dist_setMultiColFormat(fmtName, isValid)
  
    use string_tools
    use numerical_constants
  
    character(len=*), intent(in)  :: fmtName
    logical,          intent(out) :: isValid
  
    isValid = .false.
  
    select case(chr_toUpper(fmtName))
  
    case("4D") ! 4D default coordinates
      call dist_appendFormat(dist_fmtX,        one,  1)
      call dist_appendFormat(dist_fmtPX,       one,  2)
      call dist_appendFormat(dist_fmtY,        one,  3)
      call dist_appendFormat(dist_fmtPY,       one,  4)
      isValid = .true.
  
    case("6D") ! 6D default coordinates
      call dist_appendFormat(dist_fmtX,        one,  1)
  