
  LOADMSG "                        Loading Script. Please wait..."

  COLOR BRIGHT CYAN BLACK

  FIELDS
    Name    .........................     C     @user@
    Company ___......................     C
    Addr1   _____....................     C
    Addr2   .........................     C
    CitySt  _____....................     C     @city@
    Zip     _____                         N
    Country ___......................     C     USA
    Phone   _                             P
    Rand    ............... C
    xRand   ............... C
    SysDate ..........  C
    SysTime ..........  C
    SysNode ...         C
    DataLun   . N 0
  FIELDS
;
;----------------------------------------------------------------------
; verify file format
;
  FORMAT DataFmt
    Name
    Company
    Addr1
    Addr2
    CitySt
    Zip
    Country
    Phone
    SysDate
    SysTime
    SysNode
    Rand
  FORMAT


  FLUSH_KB
  BEEPS OFF
  MIN_ATTR  BRIGHT RED BLACK
  MAX_ATTR  BRIGHT BLUE BLACK
  ANS_ATTR  BRIGHT YELLOW BLACK
  LOGMSG  "@X05" @user@ " accessed VerifyDoor"


  COLOR BRIGHT CYAN BLACK
  NEWLINE 2
  PROMPT "Enter security code: " xRand
  NULL_ENTRY  AbortJob

  OPENFILE  DataLun  F:\PCB\INFO.DAT
  READFILE  DataLun DataFmt @user@
  IF @file_stat@ != "*OK*"
    TEXT "Not on file : " @user@
    GOTO AbortJob
  ENDIF

  IF xRand != Rand
    TEXT "Invalid security code : " xRand
    GOTO AbortJob
  ENDIF

  TEXT "Valid security code : " xRand
  ADJ_EXPIRE  15                ;expire date = today + 15 days
  UPDATE_USER_RECORD            ;update the user record with new

:AbortJob
  CLOSEFILE DataLun
  EXIT

