'STRTSVRS - checks passwords, initiates all libraries etc. - for SERVER S (IBM)

'121200A JUL - v1.2

external   setenv() vloadif() vunloadif() messbox() chkfname()
external   navrecs() wraptext() arytostr() strcount() posnpopup() remove()

public     entry userid getrec menuchoice getday getftr greeting areas $screen ver $actport
public     fgp bgp scw sch psa cpath lpath fgi bgi $menu $title ptstr dpath count jobs[6]
public     ptval $findcat base ptary[1] dsa $drive $a_drive spath ipath rpath apath

global     loadlibs() setup() i scr x
global     tgt lmsg mbox r1 r2 c1 c2 c3 c4 $cat1 $cat2 $cat3 $cat4 $cat5
global     y1 y2 y3
'  S_poplist poplist[1] $str_list y4 $fullname


MAIN
local $name
single-step off
  file unload all
  $a_drive = "I"     ' O=Drive D on COCKTAIL
'   $drive = "S:\database"
  $drive = "I:"
'message "Check file loc'ns - F: DATA - H: ARCHIVE (and KEYS_UPD.PF3)"
  lock system $drive
  lock system $a_drive

  load "I_SETENV.rf3" in-memory
  setenv()
  unload "I_SETENV.rf3"
  setup()

  loadlibs()

  screen clear box 1 1 sch scw 0 0 no-border
  repaint off
' message "spath is:"&str(spath)
' message "ipath is:"&str(ipath)
' message "rpath is:"&str(rpath)
' message "apath is:"&str(apath)
  transfer "srvrprog.rf3" in-memory

END MAIN


FUNCTION loadlibs()
' load other libraries
  load lpath|"bpopdb.psl" in-memory
  load lpath|"bpoptabl.psl" in-memory
  screen clear box 1 1 sch scw 0 0 no-border
  load lpath|"datelib.rf3" in-memory
  load lpath|"indexlib.rf3" in-memory
  load lpath|"envlib.rf3" in-memory
  load lpath|"strlib.rf3" in-memory
  load lpath|"dfilelib.rf3" in-memory
  load lpath|"filelib.rf3" in-memory
  load lpath|"uintlib.rf3" in-memory
  load lpath|"doslib.rf3" in-memory
  load lpath|"wraptext.rf3" in-memory
'  load lpath|"gems.rf3" in-memory
'  load lpath|"swip.rf3" in-memory
  load lpath|"soundlib.rf3" in-memory
  load lpath|"proj_lib.rf3" in-memory
END FUNCTION


FUNCTION setup()
  screen clear box 1 1 sch scw 0 0 no-border
  load lpath|"displib.rf3"
  window border
  smartpoke $_ins 0                      ' switch off INSERT mode
END FUNCTION

