home *** CD-ROM | disk | FTP | other *** search
-
- *
- *
- *
- *
- *
-
- PROCEDURE tm_list
-
- PARAMETERS tm_dbase
-
- USE &tm_dbase
-
- head_msg = nl+nl+nl+nl+;
- "File # Band Frequency Callsign"+nl+;
- "------ ---- --------- --------"
- CALL outport WITH head_msg
-
- GOTO TOP
-
- list_cont = .t.
- tm_count = 0
- DO WHILE .not. eof() .and. list_cont
-
- msg = nl+STR(file_num,6)+" "+STR(freq_band,4)+" "+;
- STR(frequency,8,3)+" "+callsign
- CALL outport WITH msg
-
- tm_count = tm_count + 1
- IF tm_count > 19
- tm_count = 0
- DO pause WITH head_msg
- ENDIF
-
- SKIP
-
- ENDDO
-
- USE
-
- IF list_cont
- DO pause WITH ""
- ENDIF
-
- RETURN
-
- *
- *
- *
- *
-
- PROCEDURE tm_input
-
- PARAMETERS tm_dbase
-
- ip_msg = "Creating record with a File Number: "
- inp_ok = .t.
- DO WHILE inp_ok
- msg = nl+nl+"Enter File number to input (CR for next, or 'E' to End) :"
- CALL outport WITH msg
-
- ans = SPACE(7)
- DO getstr WITH ans
-
- IF ans $ 'Ee'
- inp_ok = .f.
- ELSE
- USE &tm_dbase
- IF len(ans) > 0
- m_file = VAL(ans)
- SEEK m_file
- IF EOF()
- APPEND BLANK
- DO rec_upd WITH m_file, ip_msg
- ELSE
- msg = nl+nl+"Cannot Duplicate file number"
- CALL outport WITH msg
- ENDIF
- ELSE
- GOTO BOTTOM
- m_file = file_num + 1
- APPEND BLANK
- DO rec_upd WITH m_file, ip_msg
- ENDIF
- USE
- ENDIF
- ENDDO
-
- RETURN
-
-
-
- *
- *
- *
- *
- *
-
- PROCEDURE tm_upd
-
- PARAMETERS tm_dbase
-
- upd_ok = .t.
- DO WHILE upd_ok
- msg = nl+nl+"Enter File number to update (or CR to end) :"
- CALL outport WITH msg
-
- ans = SPACE(7)
- DO getstr WITH ans
-
- IF len(ans) = 0
- upd_ok = .f.
- ELSE
- USE &tm_dbase
- m_file = VAL(ans)
- ? m_file
- SEEK m_file
- IF .NOT. EOF()
- DO rec_upd WITH m_file, "Updating File Number: "
- ELSE
- msg = nl+nl+"Record Not found"
- CALL outport WITH msg
- ENDIF
- ENDIF
- ENDDO
-
- RETURN
-
- *
- *
- *
- *
- *
-
- PROCEDURE rec_upd
-
- PARAMETER arrl_file, upd_msg
-
- val_msg = nl+nl+"Enter new value: "
-
- u_fn = STR(arrl_file,6)
- u_fb = STR(freq_band,4)
- u_f = STR(frequency,8,3)
- u_cs = callsign
-
- msg = nl+nl+upd_msg+u_fn+nl
- CALL outport WITH msg
-
- rec_ok = .f.
- DO WHILE .NOT. rec_ok
- uok = .f.
- DO WHILE .NOT. uok
- msg = nl+nl+"Frequency Band: "+u_fb+nl+nl+"OK ?"
- CALL outport WITH msg
- ans = SPACE(1)
- DO getstr WITH ans
- uok = ans $ "Yy"
- if .NOT. uok
- CALL outport WITH val_msg
- u_fb = SPACE(20)
- DO getstr WITH u_fb
- ENDIF
- ENDDO
-
- uok = .f.
- DO WHILE .NOT. uok
- msg = nl+nl+"Freuqency: "+u_f+nl+nl+"OK ?"
- CALL outport WITH msg
- ans = SPACE(1)
- DO getstr WITH ans
- uok = ans $ "Yy"
- if .NOT. uok
- CALL outport WITH val_msg
- u_f = SPACE(20)
- DO getstr WITH u_f
- ENDIF
- ENDDO
-
- uok = .f.
- DO WHILE .NOT. uok
- msg = nl+nl+"Callsign: "+u_cs+nl+nl+"OK ?"
- CALL outport WITH msg
- ans = SPACE(1)
- DO getstr WITH ans
- uok = ans $ "Yy"
- if .NOT. uok
- CALL outport WITH val_msg
- u_cs = SPACE(20)
- DO getstr WITH u_cs
- u_cs = UPPER(u_cs)
- ENDIF
- ENDDO
- ans = SPACE(1)
- msg = nl+nl+"Record OK ?"
- CALL outport WITH msg
- DO getstr WITH ans
- IF ans $ "Yy"
- rec_ok = .t.
- REPLACE file_num WITH arrl_file, freq_band WITH VAL(u_fb);
- frequency WITH VAL(u_f), callsign WITH u_cs
- ENDIF
-
- ENDDO
- RETURN
-
-
- PROCEDURE pause
-
- PARAMETERS p_head
-
- p_msg = nl+nl+"Hit any Character to continue or S to stop: "
- CALL outport WITH p_msg
-
- p_msg = SPACE(1)
- DO getstr with p_msg
-
- IF p_msg $ "Ss"
- list_cont = .f.
- ELSE
- CALL outport WITH p_head
- ENDIF
-
- RETURN
-
- *
- *
- *
- *
- *
-
- PROCEDURE getstr
-
- PARAMETER string
-
- CALL inport WITH string
-
- IF asc(string) > 128
- errmsg = nl+nl+"Timeout"+nl+nl
- CALL outport WITH errmsg
- RETURN TO MASTER
- ENDIF
- RETURN
-