'DATA_MGT - various programs for updating/altering data files

external   sch scw popuplist() bgs fgs

public     ptstr

global     x l1 l2 jobnr l3

MAIN
  single-step off
'   quiet off
  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
  l1 = "˙˙˙˙˙Rebuild˙keys"
  l2 = "˙˙˙˙Update˙Colours˙˙˙˙"
  l3 = "˙˙˙˙Rebuild˙indices"
' l3 = "˙˙˙˙Re-allocations˙"
' l4 = "˙˙˙˙˙Update˙Stock˙"
' l5 = "˙˙˙˙˙Reservations"
' l6 = "˙˙˙˙˙˙View˙Stock˙"                 ' MUST be HARD spaces - Alt-255
' l7 = "˙Requisitions˙for˙Job˙"                 ' MUST be HARD spaces - Alt-255
  while true
    screen print 8 27 bgs fgs (format("Data management","M26"))
    x = popuplist(9,27,17,l1&l2&l3,"˙˙˙{Esc} to exit˙˙˙",1,0)
    screen clear box 1 1 sch scw 0 0 no-border
    repaint off
    if x = 0
      if ptstr = l1
        execute "keys_upd.rf3" in-memory
      elseif ptstr = l2
        execute "chg_cols.rf3" in-memory
      elseif ptstr = l3
        execute "bldindex.rf3" in-memory
'     elseif ptstr = l3
'       execute "reallcns.rf3" in-memory
'     elseif ptstr = l4
'       StockUpdate()
'     elseif ptstr = l6
'       execute "vu_stock.rf3" in-memory
'     elseif ptstr = l7
'       PrintJobReqns()
'     elseif ptstr = l5
'       execute "rsvstk_b.rf3" in-memory
      end if
    elseif x = -1
      exit while
    end if
  end while
  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
  file unload all
  transfer "pm_menu.psl" in-memory
END MAIN

