*         ------------------------------------
*         |          LOGENTRY.CMD            |
*         |   Entry routine to HAMLOG.DBF    |
*         |   a subroutine of HAMLOG.CMD     |
*         |  Written 6/84 by Orbra W. Bliss  |
*         |   Amateur Radio W9GEK / HC1BW    |
*         ------------------------------------
* Modified 2/3/85 to provide verification and correction.
* Revised 2/16/85 formatting corrected. OWB
*

ERASE
GO BOTTOM
  * -- initialize mband & mode here so that they stay the same until changed
  STORE '  ' TO MBAND
  STORE '    ' TO MMODE
  STORE '        ' TO MDATE
DO WHILE T
  *  -- initialize variables to blank
  STORE '   ' TO MRPT
  STORE '    ' TO MTIME
  STORE '          ' TO MSTATION
  STORE '              ' TO MNAME
  STORE '                    ' TO MQTH
  STORE '                                        ' TO MREMARKS
  ERASE
* - Other Stations Insert Your Call Here  -------
  @  2,21 SAY 'LOG OF HC1BW'
  @  5,3  SAY 'THE DATE IS ' GET MDATE PICTURE '99/99/99'
  @  5,30 SAY 'TIME ' GET MTIME PICTURE '9999'
  @  5,42 SAY 'E.S.T.'
  @  7,14 SAY 'STATION ' GET MSTATION
  @  9,17 SAY 'NAME ' GET MNAME
  @ 11,18 SAY 'QTH ' GET MQTH
  @ 13,10 SAY 'RPT ' GET MRPT
  @ 13,25 SAY 'BAND ' GET MBAND
  @ 13,35 SAY 'MODE ' GET MMODE
  @ 15,3  SAY 'REMARKS  ' GET MREMARKS
  *  -- read format file
  READ
  *  -- check to see if ready to exit
  IF MSTATION=' '
     * -- close file
     USE
     RETURN
  ENDIF
  *  -- add a blank record to DBF file
  APPEND BLANK
  *  -- substitute input variables for database variables
  REPLACE DATE WITH MDATE
  REPLACE TIME WITH MTIME, STATION WITH !(MSTATION)
  REPLACE NAME WITH !(MNAME), QTH WITH !(MQTH), RPT WITH MRPT
  REPLACE BAND WITH MBAND, MODE WITH !(MMODE), REMARKS WITH MREMARKS
  * -------- Verification of entry ----------
  * - Other Stations Insert Your Call Here  -------
  @  2,21 SAY 'LOG OF HC1BW'
  @  5,3  SAY 'THE DATE IS  ' +DATE
  @  5,30 SAY 'TIME  ' +TIME
  @  5,42 SAY 'E.S.T.'
  @  7,14 SAY 'STATION ' +STATION
  @  9,17 SAY 'NAME ' +NAME
  @ 11,18 SAY 'QTH ' +QTH
  @ 13,10 SAY 'RPT  ' +RPT
  @ 13,25 SAY 'BAND  ' +BAND
  @ 13,35 SAY 'MODE  ' +MODE
  @ 15,3  SAY 'REMARKS: ' +REMARKS
  @ 18,10 SAY 'IS THE ABOVE DATA CORRECT ? Y/N '
  WAIT TO ANSWER
  IF !(ANSWER)='N'
      STORE # TO RECNUM
      DO LOGCHNG
  ENDIF
ENDDO
RETURN
