home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
182.LOGBOEK.PRC
< prev
next >
Wrap
Text File
|
1986-08-31
|
28KB
|
1,164 lines
* -- LOGBOEK.PRC
* -- Procedures Generated By FlashCode V1.00 on 08/26/1986 - 11:33:16
* -- (C) Copyright 1985, The Software Bottling Company Of New York
* -- This Program may not be used without the above Copyright Notice
*
*********************
PROCEDURE AddRecFL
*********************
CLEAR
USE LOGBOEK
SET INDEX TO LOGBOEK
ScrnNumFL = 1
OldScrnFL = 0
@ 24,0 SAY "Initializing Variables"
ActionFL = "INITIAL"
DO ActProFL
*
DO WHILE .T.
*
* -- Modification #4 See Manual --
*
* -- Do Calculations For All Fields --
IF ScrnNumFL<>OldScrnFL
ActionFL = "DISPLAY"
DO ActProFL
OldScrnFL = ScrnNumFL
ENDIF
GOTO BOTTOM
IF .NOT. EOF()
SKIP
ENDIF
@ 0,0 SAY "Record # "+STR(RECNO(),5)
* -- Get Data Input --
@ 24,0 SAY "Enter or Re-Enter Information ..."
ActionFL = "GET"
DO ActProFL
READ
SET COLOR TO 15/0, 0/7
@ 24,0
@ 24,0 SAY "Edit Calculations OR Press 'PgDn' To Exit."
*
* -- Modification #5 See Manual --
*
* -- Re-Do Calculations For All Fields and Re-Display --
DO CASE
ENDCASE
READ
SET COLOR TO 15/0, 0/7
@ 24,0
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"EQ"
@ 24,0 SAY "[E]dit, [Q]uit & Save" GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Next Screen (If On Last Screen Then Goto First Screen) --
CASE AnsFL = "N"
ScrnNumFL = ScrnNumFL+1
IF ScrnNumFL>MaxScrnFL
ScrnNumFL = 1
ENDIF
LOOP
* -- Previous Screen (If On First Screen Then Goto Last Screen) --
CASE AnsFL = "P"
ScrnNumFL = ScrnNumFL-1
IF ScrnNumFL<1
ScrnNumFL = MaxScrnFL
ENDIF
LOOP
* -- Edit Current Screen --
CASE AnsFL = "E"
LOOP
* -- Quit & Ask To Save Record --
CASE AnsFL = "Q"
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"YN"
@ 24,0 SAY "Save Record? Y/N" GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Do Not Save & Return To Main Menu --
CASE AnsFL = "N"
USE
RETURN
* -- Save & Loop To Enter Another Record --
CASE AnsFL = "Y"
@ 24,0 SAY "Saving Record To File ..."
APPEND BLANK
ActionFL = "REPLACE"
DO ActProFL
@ 24,0
@ 24,0 SAY "Initializing Variables"
ActionFL = "INITIAL"
DO ActProFL
ScrnNumFL = 1
IF MaxScrnFL<>1 .AND. OldScrnFL<>1
OldScrnFL = 0
ELSE
OldScrnFL = 1
ENDIF
@ 24,0
LOOP
ENDCASE
ENDCASE
ENDDO .T.
RETURN
*********************
PROCEDURE FindLocFL
*********************
* -- Set Index To Default (ON) Position --
InxFL = "ON"
DO WHILE .T.
* -- If No Records Exist Then LeaveFL Is True --
USE LOGBOEK
IF EOF()
LeaveFL = .T.
MaxRecFL = 0
ELSE
LeaveFL = .F.
GO BOTTOM
MaxRecFL = RECNO()
GO TOP
ENDIF
* -- Use Index If On --
IF InxFL = "ON"
SET INDEX TO LOGBOEK
ENDIF
* -- Display Lookup Menu --
CLEAR
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
@ 2,22 SAY "LOOK-UP Records For Browse, Edit, Delete"
@ 2,79 SAY "║"
@ 3,0 SAY "║ FILE: "+"LOGBOEK"
@ 3,79 SAY "║"
@ 4,0 SAY "╟──────────────────────────────────────────────────────────────────────────────╢"
@ 5,0 SAY "║"
@ 5,79 SAY "║"
@ 6,0 SAY "║"
@ 6,22 SAY "1 <- Go To A Record By Number"
@ 6,79 SAY "║"
@ 7,0 SAY "║"
@ 7,22 SAY "2 <- Go To The Top Record"
@ 7,79 SAY "║"
@ 8,0 SAY "║"
@ 8,22 SAY "3 <- Go To The Bottom Record"
@ 8,79 SAY "║"
@ 9,0 SAY "║"
@ 9,79 SAY "║"
@ 10,0 SAY "║"
@ 10,22 SAY "4 <- Locate Using Screen Entry Criteria"
@ 10,79 SAY "║"
@ 11,0 SAY "║"
@ 11,22 SAY "5 <- Locate Using Free Form Criteria"
@ 11,79 SAY "║"
@ 12,0 SAY "║"
@ 12,22 SAY "6 <- Fast Find by Index"
@ 12,79 SAY "║"
@ 13,0 SAY "║"
@ 13,79 SAY "║"
@ 14,0 SAY "║"
@ 14,22 SAY "7 <- Turn Index ON/OFF. Index Is Now "+InxFL
@ 14,79 SAY "║"
@ 15,0 SAY "║"
@ 15,79 SAY "║"
@ 16,0 SAY "║"
@ 16,22 SAY "0 <- Exit TO Main Menu"
@ 16,79 SAY "║"
@ 17,0 SAY "║"
@ 17,79 SAY "║"
@ 18,0 SAY "║"
@ 18,79 SAY "║"
@ 19,0 SAY "║"
@ 19,22 SAY "Enter number of your choice:"
@ 19,79 SAY "║"
@ 20,0 SAY "║"
@ 20,79 SAY "║"
@ 21,0 SAY "║ Records:"+STR(MaxRecFL,6)
@ 21,79 SAY "║"
@ 22,0 SAY "║"
@ 22,79 SAY "║"
@ 23,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
@ 3,8 SAY "LOGBOEK"
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"12345670"
@ 19,51 GET AnsFL PICT "9"
READ
ENDDO
* -- If Response is '0' Return to Main Menu --
IF AnsFL = "0"
USE
RELE InxFL
RETURN
ENDIF
* -- If No Records Exist, Do Not Allow User To Enter Any Option --
IF LeaveFL
@ 24,0 SAY "No Records In File, Press Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 24,0
LOOP
ENDIF
DO CASE
* -- Goto Record by Number --
CASE AnsFL = "1"
RecNumFL = 0
@ 19,22 SAY "Enter Record Number (0=EXIT): " GET RecNumFL PICT "99999" ;
RANGE 0, MaxRecFL
READ
IF RecNumFL = 0
LOOP
ENDIF
GOTO RecNumFL
RELE RecNumFL
SearchFL = ".T."
ScrnNumFL = 1
OldScrnFL = 0
* -- Goto Top Of File --
CASE AnsFL = "2"
GOTO TOP
SearchFL = ".T."
ScrnNumFL = 1
OldScrnFL = 0
* -- Goto Bottom Of File
CASE AnsFL = "3"
GOTO BOTTOM
SearchFL = ".T."
ScrnNumFL = 1
OldScrnFL = 0
* -- Locate Using Screen Entry Criteria --
CASE AnsFL = "4"
CLEAR
ScrnNumFL = 1
OldScrnFL = 0
@ 24,0 SAY "Initializing Variables"
ActionFL = "INITIAL"
DO ActProFL
@ 24,0
CriteriaFL = .T.
DO WHILE CriteriaFL
IF ScrnNumFL<>OldScrnFL
ActionFL = "DISPLAY"
DO ActProFL
* -- Do Calculations For All Fields --
ActionFL="GET"
DO ActProFL
CLEAR GETS
SET COLOR TO 15/0, 0/7
OldScrnFL = ScrnNumFL
ENDIF
@ 24,0 SAY "Enter search criteria ..."
DO CASE
* -- From Screen B:LOGBOEK --
CASE ScrnNumFL=1
SET COLOR TO GR/B,GR/B
@ 7,18 GET XSTATION PICT "!!!!!!!!!!!!"
ENDCASE
READ
SET COLOR TO 15/0, 0/7
@ 24,0
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"QE12"
@ 24,0 SAY "[E]dit Screen, [1] Begin Search From Top ";
+"[2] Begin Search At Record#, [Q]uit " GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
* -- Start Search From Top Of File --
IF AnsFL = "1"
GOTO TOP
AnsFL = "B"
ENDIF
* -- Start Search From Record Number Entered by User --
IF AnsFL = "2"
RecNumFL = 0
@ 24,0 SAY "Enter Record #:" GET RecNumFL PICT "999999" RANGE 0, MaxRecFL
READ
IF RecNumFL = 0
@ 24,0
RELE RecNumFL
LOOP
ENDIF
GOTO RecNumFL
RELE RecNumFL
AnsFL = "B"
@ 24,0
ENDIF
DO CASE
* -- Edit Criteria On Current Screen --
CASE AnsFL = "E"
LOOP
* -- Begin Search Based On Criteria Entered --
CASE AnsFL = "B"
*
* -- Modification #6 See Manual --
*
* -- Build SearchFL Based on Criteria Entered --
SearchFL = ".T."
IF SUBSTR(XSTATION,1,1)<>" "
SearchFL=SearchFL+".AND. UPPER(STATION)=UPPER(TRIM(XSTATION))"
ENDIF
@ 24,0 SAY "Searching..."
LOCATE NEXT 65000 FOR &SearchFL
IF EOF()
@ 24,0 SAY "Record Not In The File. Press Any Key"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 24,0
GOTO TOP
LOOP
ENDIF
@ 24,0
CriteriaFL = .F.
* -- Next Screen (If On Last Screen Then Goto First Screen) --
CASE AnsFL = "N"
ScrnNumFL = ScrnNumFL+1
IF ScrnNumFL>MaxScrnFL
ScrnNumFL = 1
ENDIF
LOOP
* -- Previous Screen (If On First Screen Then Goto Last Screen) --
CASE AnsFL = "P"
ScrnNumFL = ScrnNumFL-1
IF ScrnNumFL<1
ScrnNumFL = MaxScrnFL
ENDIF
LOOP
* -- Quit (Return To Lookup Menu) --
CASE AnsFL = "Q"
RELE CriteriaFL
EXIT
ENDCASE
ENDDO CriteriaFL
RELE CriteriaFL
IF AnsFL = "Q"
LOOP
ENDIF
* -- Locate Using Free Form Criteria Search --
CASE AnsFL = "5"
USE LOGBOEK.FLD
IF FILE("LOGBOEK.LCM")
RESTORE FROM LOGBOEK.LCM ADDITIVE
ELSE
SearchFL1 = 'FIELD_NAME = "<EXPRESSION>"'+SPACE(51)
SearchFL2 = SPACE(78)
ENDIF
BadTypeFL = .T.
FieldsFL = .T.
AnsFL = "D"
CLEAR
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
@ 2,22 SAY "Locate Using Free Form Criteria Entry"
@ 2,79 SAY "║"
@ 3,0 SAY "║"
@ 3,79 SAY "║"
@ 4,0 SAY "║"
@ 4,79 SAY "║"
@ 5,0 SAY "╟──────────────────────────────────────────────────────────────────────────────╢"
@ 6,0 SAY "║"
@ 6,79 SAY "║"
@ 7,0 SAY "║"
@ 7,79 SAY "║"
@ 8,0 SAY "╙──────────────────────────────────────────────────────────────────────────────╜"
@ 6,1 GET SearchFL1
@ 7,1 GET SearchFL2
CLEAR GETS
DO WHILE BadTypeFL
IF FieldsFL
IF AnsFL = "U"
SKIP -24
@ 9,0 CLEAR
@ 9,0 SAY "┌───────────── FIELD LISTING ─────────────┐"
LIST NEXT 12 OFF
IF EOF()
? " ****************** END ****************** "
ENDIF
ENDIF
IF AnsFL = "D" .AND. .NOT. EOF()
@ 9,0 CLEAR
@ 9,0 SAY "┌───────────── FIELD LISTING ─────────────┐"
LIST NEXT 12 OFF
IF EOF()
? " ****************** END ****************** "
ENDIF
ENDIF
FieldsFL = .F.
ENDIF
* -- Get User Response --
OptionFL = .T.
DO WHILE OptionFL
AnsFL = " "
DO WHILE .NOT. AnsFL$"EUDMQ12"
@ 24,0 SAY "[E]dit, [U]p Scroll Fields, [D]own Scroll Fields,";
+" [M]ore Commands, [Q]uit" GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
IF AnsFL = "M"
AnsFL = " "
DO WHILE .NOT. AnsFL$"12EUDMQ"
@ 24,0 SAY "[1] Begin Search From Top, [2] Begin Search From Record #,";
+ " [M]ore Commands" GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
ENDIF
IF AnsFL = "M"
LOOP
ENDIF
OptionFL = .F.
ENDDO
RELE OptionFL
* -- Start Search From Top Of File --
IF AnsFL = "1"
USE
USE LOGBOEK
GOTO TOP
AnsFL = "B"
ENDIF
* -- Start Search From Record Number Entered by User --
IF AnsFL = "2"
RecNumFL = 0
@ 24,0 SAY "Enter Record #:" GET RecNumFL PICT "999999" RANGE 0, MaxRecFL
READ
IF RecNumFL = 0
RELE RecNumFL
@ 24,0
LOOP
ENDIF
USE
USE LOGBOEK
GOTO RecNumFL
RELE RecNumFL
AnsFL = "B"
@ 24,0
ENDIF
DO CASE
* -- Edit Criteria --
CASE AnsFL = "E"
@ 6,1 GET SearchFL1
@ 7,1 GET SearchFL2
@ 4,1 SAY "Enter/Edit Search Criteria ..."
READ
SET COLOR TO 15/0, 0/7
@ 4,1 SAY SPACE(40)
LOOP
* -- Display More Fields --
CASE AnsFL = "U" .OR. AnsFL = "D"
FieldsFL = .T.
LOOP
* -- Begin Search Based On Criteria Entered --
CASE AnsFL = "B"
SearchFL = SearchFL1+SearchFL2
IF TYPE(TRIM('&SearchFL'))<>"L"
@ 24,0 SAY "You have entered the criteria incorrectly, Press Any Key"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
USE
USE LOGBOEK.FLD
@ 24,0
LOOP
ELSE
@ 24,0 SAY "Searching..."
LOCATE NEXT 65000 FOR &SearchFL
IF EOF()
@ 24,0 SAY "Record Not In The File. Press Any Key"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
USE
USE LOGBOEK.FLD
@ 24,0
LOOP
ENDIF
SAVE TO LOGBOEK.LCM ALL LIKE SearchFL*
BadTypeFL = .F.
ENDIF
@ 24,0
* -- Quit To Lookup Menu --
CASE AnsFL = "Q"
BadTypeFL = .F.
ENDCASE
ENDDO BadTypeFL
IF AnsFL = "Q"
RELE SearchFL1, SearchFL2, BadTypeFL, FieldsFL
LOOP
ENDIF
ScrnNumFL = 1
OldScrnFL = 0
RELE searchFL1, searchFL2, BadTypeFL, FieldsFL
*
* -- Modification #7 See Manual --
*
* -- Fast Find A Record --
CASE AnsFL = "6"
* --
ActionFL = "INITIAL"
DO ActProFL
USE LOGBOEK
SET INDEX TO LOGBOEK
CLEAR
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
@ 2,31 SAY "FAST FIND BY INDEX"
@ 2,79 SAY "║"
@ 3,0 SAY "║"
@ 3,79 SAY "║"
@ 4,0 SAY "║ FILE: "+"LOGBOEK"
@ 4,64 SAY "RECORDS:"+STR(MaxRecFL,6)+" ║"
@ 5,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
@ 9,0 SAY "┌──────────────────────────────────────────────────────────────────────────────┐"
@ 10,0 SAY "│"
@ 10,79 SAY "│"
@ 11,0 SAY "│"
@ 11,79 SAY "│"
@ 12,0 SAY "│"
@ 12,79 SAY "│"
@ 13,0 SAY "└──────────────────────────────────────────────────────────────────────────────┘"
@ 16,0 SAY "INDEX IS ON:"
@ 18,0 SAY "STATION"
NotFoundFL = .T.
DO WHILE NotFoundFL
@ 11,2 SAY "Enter STATION......." GET XSTATION PICT "!!!!!!!!!!!!"
@ 8,0 SAY "Enter first field of index for the find ... "
READ
@ 8,0 SAY SPACE(50)
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"QEB"
@ 24,0 SAY "[E]dit Criteria, [B]egin Search, [Q]uit " GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Quit To Lookup Menu --
CASE AnsFL = "Q"
NotFoundFL = .F.
SearchFL = ".F."
EXIT
* -- Edit Criteria --
CASE AnsFL = "E"
LOOP
* -- Begin Search --
CASE AnsFL = "B"
FindFL = UPPER(TRIM(XSTATION))
IF LEN("&FindFL") = 0
FindFL = " "
ENDIF
FIND "&FindFL"
IF EOF()
@ 24,0 SAY "Record Not Found, Press Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 24,0
LOOP
ELSE
NotFoundFL = .F.
SearchFL = ".T."
ENDIF
@ 24,0
ENDCASE
ENDDO NotFoundFL
IF .NOT. NotFoundFL .AND. .NOT. &SearchFL
RELE FindFL, NotFoundFL, SearchFL
LOOP
ENDIF
ScrnNumFL = 1
OldScrnFL = 0
RELE FindFL, NotFoundFL
* -- Turn Index ON/OFF --
CASE AnsFL = "7"
IF InxFL = "OFF"
InxFL = "ON "
SET INDEX TO LOGBOEK
ELSE
InxFL = "OFF"
SET INDEX TO
ENDIF
LOOP
ENDCASE
* -- Start of main program if record is found in file. --
* -- Skip through records & screens. --
*
ActionFL = "RETRIEVE"
DO ActProFL
* -- Do Calculations On Non-File Variables. --
ModCheckFL = .F.
LoopRecFL = .T.
PrevRecFL = 0
DO WHILE LoopRecFL
ScrnNumFL = 1
IF ScrnNumFL<>OldScrnFL
ActionFL = "DISPLAY"
Do ActProFL
ENDIF
IF RECNO()<>PrevRecFL .OR. ScrnNumFL<>OldScrnFL
ActionFL = "GET"
DO ActProFL
CLEAR GETS
SET COLOR TO 15/0, 0/7
IF DELETED()
DelFL = " *DELETED*"
ELSE
DelFL = " "
ENDIF
PrevRecFL = RECNO()
OldScrnFL = 1
ENDIF
@ 0,0 SAY "Record # "+STR(RECNO(),5)+DelFL
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"ENPSQ"
@ 24,0 SAY ;
"[E]dit, [S]kip n Records, [N]ext OR [P]rev Record, [Q]uit ";
GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Edit Record --
CASE AnsFL = "E"
EditFL = .T.
DO WHILE EditFL
IF ScrnNumFL<>OldScrnFL
ActionFL = "DISPLAY"
DO ActProFL
ENDIF
IF RECNO()<>PrevRecFL .OR. ScrnNumFL<>OldScrnFL
ActionFL = "GET"
DO ActProFL
CLEAR GETS
SET COLOR TO 15/0, 0/7
PrevRecFL = RECNO()
OldScrnFL = ScrnNumFL
ENDIF
@ 0,0 SAY "Record # "+STR(RECNO(),5)+DelFL
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"MDUQ"
@ 24,0 SAY "[M]odify Data, [D]elete, [U]n-delete, [Q]uit & Save";
GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Modify Data --
CASE AnsFL = "M"
ModCheckFL = .T.
@ 24,0 SAY "Enter OR Re-Enter Information"
ActionFL = "GET"
DO ActProFL
READ
SET COLOR TO 15/0, 0/7
@ 24,0
@ 24,0 SAY "Edit Calculations OR Press 'PgDn' To Exit."
* -- Do Calculations For All Fields And Re-Display --
DO CASE
ENDCASE
READ
SET COLOR TO 15/0, 0/7
@ 24,0
* -- Delete Record --
CASE AnsFL = "D"
@ 24,0 SAY "Deleting Record"
DELETE
DelFL = " *DELETED*"
@ 0,0 SAY "Record # "+STR(RECNO(),5)+DelFL
@ 24,0
LOOP
* -- Un-Delete Record --
CASE AnsFL = "U"
@ 24,0 SAY "Un-Deleting Record"
RECALL
DelFL = " "
@ 0,0 SAY "Record # "+STR(RECNO(),5)+DelFL
@ 24,0
LOOP
* -- Next Screen (If On Last Screen Then Goto First Screen) --
CASE AnsFL = "N"
ScrnNumFL = ScrnNumFL+1
IF ScrnNumFL>MaxScrnFL
ScrnNumFL = 1
ENDIF
LOOP
* -- Previous Screen (If On First Screen Then Goto Last Screen) --
CASE AnsFL = "P"
ScrnNumFL = ScrnNumFL-1
IF ScrnNumFL<1
ScrnNumFL = MaxScrnFL
ENDIF
LOOP
* -- Quit (Edit Mode) --
CASE AnsFL = "Q"
IF ModCheckFL
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"YN"
@ 24,0 SAY "Save Record? Y/N:" GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
* -- Save Record --
IF AnsFL = "Y"
IF InxFL = "OFF"
RecNumFL = RECNO()
SET INDEX TO LOGBOEK
GOTO RecNumFL
@ 24,0 SAY "Saving Changes ..."
ActionFL = "REPLACE"
DO ActProFL
SET INDEX TO
GOTO RecNumFL
RELE RecNumFL
ELSE
@ 24,0 SAY "Saving Changes ..."
ActionFL = "REPLACE"
DO ActProFL
ENDIF
@ 24,0
ELSE
ActionFL = "RETRIEVE"
DO ActProFL
* -- Do Calculations For All Fields --
ActionFL = "GET"
DO ActProFL
CLEAR GETS
SET COLOR TO 15/0, 0/7
ENDIF
ModCheckFL = .F.
ENDIF
EXIT
ENDCASE
ENDDO EditFL
RELE EditFL
LOOP
* -- Skip n Records --
CASE AnsFL = "S"
PrevRecFL = RECNO()
RecNumFL = 0
@ 24,0 SAY "Enter number of records to skip: " GET RecNumFL PICT "999999"
READ
IF RecNumFL>0 .AND. EOF()
LOOP
ENDIF
SKIP RecNumFL
IF EOF()
SKIP -1
ENDIF
ActionFL = "RETRIEVE"
DO ActProFL
* -- Do Calculations For Non-File Variables --
RELE RecNumFL
@ 24,0
LOOP
* -- Next Record --
CASE AnsFL = "N"
PrevRecFL = RECNO()
@ 24,0 SAY "Searching For Next Record"
RecNumFL = RECNO()
SKIP +1
LOCATE NEXT 65000 FOR &SearchFL
IF EOF()
@ 24,0 SAY "No More Records Found, Press Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
GOTO RecNumFL
ELSE
ActionFL = "RETRIEVE"
DO ActProFL
* -- Do Calculations For Non-File Variables --
ENDIF
RELE RecNumFL
@ 24,0
LOOP
* -- Previous Record --
CASE AnsFL = "P"
PrevRecFL = RECNO()
@ 24,0 SAY "Searching For Previous Record"
RecNumFL = RECNO()
IF .NOT. BOF()
SKIP -1
ENDIF
IF .NOT. (&SearchFL)
DO WHILE .NOT. BOF()
IF .NOT. (&SearchFL)
SKIP -1
ENDIF
ENDDO
ENDIF
IF BOF()
@ 24,0
@ 24,0 SAY "No More Records Found, Press Any Key ..."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
GOTO RecNumFL
ELSE
ActionFL = "RETRIEVE"
DO ActProFL
* -- Do Calculations For Non-File Variables --
ENDIF
RELE RecNumFL
@ 24,0
LOOP
* -- Quit To Lookup Menu --
CASE AnsFL = "Q"
USE
LoopRecFL = .F.
ENDCASE
ENDDO LoopRecFL
RELE LoopRecFL, PrevRecFL, ModCheckFL
ENDDO .T.
RETURN
*********************
PROCEDURE DBInfFL
*********************
CLEAR
@ 1,0 SAY "╔══════════════════════════════════════════════════════════════════════════════╗"
@ 2,0 SAY "║"
@ 2,26 SAY "DISPLAY DATABASE INFORMATION"
@ 2,79 SAY "║"
@ 3,0 SAY "║ FILE: "+"LOGBOEK"
@ 3,79 SAY "║"
@ 4,0 SAY "╚══════════════════════════════════════════════════════════════════════════════╝"
@ 5,1 SAY "──────────────────────────────────────────┐ ┌─────────────────────────────────┐"
@ 6,43 SAY "│ │"
@ 6,79 SAY "│"
@ 7,43 SAY "│ └─────────────────────────────────┘"
@ 8,43 SAY "│ ┌─────────────────────────────────┐"
@ 9,43 SAY "│ │"
@ 9,79 SAY "│"
@ 10,43 SAY "│ └─────────────────────────────────┘"
@ 11,43 SAY "│"
@ 12,43 SAY "│"
@ 13,43 SAY "│"
@ 14,43 SAY "│"
@ 15,43 SAY "│"
@ 16,43 SAY "│"
@ 17,43 SAY "│"
@ 18,43 SAY "│"
@ 19,43 SAY "│"
@ 20,43 SAY "│"
@ 21,1 SAY "──────────────────────────────────────────┘"
FieldsFL = .T.
ClrLinFL = .F.
RecNumFL = 1
DO WHILE .T.
USE LOGBOEK
IF EOF()
MaxRecFL = 0
ELSE
GO BOTTOM
MaxRecFL = RECNO()
ENDIF
@ 6,47 SAY "There Are "+STR(MaxRecFL,5)+" Record(s)."
IF FieldsFL
IF ClrLinFL
CntFL = 1
DO WHILE CntFL<15
? SPACE(43)
CntFL = CntFL+1
ENDDO
RELE CntFL
ENDIF
USE
USE LOGBOEK.FLD
GOTO RecNumFL
@ 5,0 SAY " "
LIST NEXT 13 OFF
IF EOF()
? " ****************** END ****************** "
GOTO TOP
ENDIF
RecNumFL = RECNO()
USE
FieldsFL = .F.
ENDIF
* -- Get User Response --
AnsFL = " "
DO WHILE .NOT. AnsFL$"MRPQ"
@ 24,0 SAY "[M]ore Fields, [R]e-Index, [P]ack, [Q]uit " GET AnsFL PICT "!"
READ
ENDDO
@ 24,0
DO CASE
* -- Display More Fields --
CASE AnsFL = "M"
ClrLinFL = .T.
FieldsFL = .T.
LOOP
* -- Pack Database --
CASE AnsFL = "P"
USE LOGBOEK
SET INDEX TO LOGBOEK
@ 9,47 SAY "Please Wait While Packing..."
PACK
@ 9,47 SAY SPACE(30)
LOOP
* -- Re-Index File --
CASE AnsFL = "R"
USE LOGBOEK
SET INDEX TO LOGBOEK
@ 9,47 SAY "Please Wait While Indexing..."
INDEX ON UPPER(&IndexFL) TO LOGBOEK
@ 9,47 SAY SPACE (30)
LOOP
* -- Quit To Main Menu --
CASE AnsFL = "Q"
USE
RELE FieldsFL, ClrLinFL, RecNumFL
EXIT
ENDCASE
ENDDO .T.
RETURN
*
* -- Modification #8 See Manual
*
*********************
PROCEDURE ActProFL
*********************
DO CASE
* -- Display Screen --
CASE ActionFL = "DISPLAY"
DO CASE
CASE ScrnNumFL=1
* -- Screen Display B:LOGBOEK.SCR
SET COLOR TO W+/B,GR/B
CLEAR
SET COLOR TO GR/B
@ 2,4 SAY "LOG FROM PA3CPL."
@ 3,3 SAY "╔═════════════════════════════════════════════════════════════════════════╗"
@ 4,3 SAY "║"
@ 4,77 SAY "║"
@ 5,3 SAY "║"
@ 5,8 SAY "DATUM"
@ 5,16 SAY ": / /"
@ 5,49 SAY "FREQUENTIE :"
@ 5,66 SAY "MHz."
@ 5,77 SAY "║"
@ 6,3 SAY "║"
@ 6,77 SAY "║"
@ 7,3 SAY "║"
@ 7,8 SAY "STATION :"
@ 7,34 SAY "TIME : G.M.T."
@ 7,77 SAY "║"
@ 8,3 SAY "║"
@ 8,77 SAY "║"
@ 9,3 SAY "║"
@ 9,8 SAY "REPORT"
@ 9,16 SAY ": SEND"
@ 9,34 SAY "RECEIVED :"
@ 9,77 SAY "║"
@ 10,3 SAY "║"
@ 10,77 SAY "║"
@ 11,3 SAY "║"
@ 11,8 SAY "QRA :"
@ 11,34 SAY "AFSTAND :"
@ 11,53 SAY "KM."
@ 11,77 SAY "║"
@ 12,3 SAY "║"
@ 12,77 SAY "║"
@ 13,3 SAY "║"
@ 13,8 SAY "MODE :"
@ 13,25 SAY "(T/MS/ES/AU/EME/SAT) VIA :"
@ 13,77 SAY "║"
@ 14,3 SAY "║"
@ 14,77 SAY "║"
@ 15,3 SAY "║"
@ 15,8 SAY "NAAM :"
@ 15,77 SAY "║"
@ 16,3 SAY "║"
@ 16,77 SAY "║"
@ 17,3 SAY "║"
@ 17,8 SAY "RIG/ANT"
@ 17,16 SAY ":"
@ 17,43 SAY "POWER : WATT."
@ 17,77 SAY "║"
@ 18,3 SAY "║"
@ 18,77 SAY "║"
@ 19,3 SAY "║"
@ 19,8 SAY "REMARKS :"
@ 19,77 SAY "║"
@ 20,3 SAY "║"
@ 20,77 SAY "║"
@ 21,3 SAY "╚═════════════════════════════════════════════════════════════════════════╝"
SET COLOR TO W+/B, /W
ENDCASE
RETURN
* -- Initialize Data Variables --
CASE ActionFL = "INITIAL"
RESTORE FROM LOGBOEK.PUB ADDITIVE
RETURN
* -- Get Data Input --
CASE ActionFL = "GET"
DO CASE
* -- From Screen B:LOGBOEK --
CASE ScrnNumFL=1
SET COLOR TO GR/B,GR/B
@ 5,18 GET XDATUM
@ 5,62 GET XFREQ PICT "999"
@ 7,18 GET XSTATION PICT "!!!!!!!!!!!!"
@ 7,45 GET XTIME PICT "99!99"
@ 9,23 GET XSEND PICT "99!X999X"
@ 9,45 GET XRECEIVED PICT "99!X999X"
@ 11,18 GET XQRA PICT "!!!!!!"
@ 11,45 GET XAFSTAND PICT "999999" RANGE 0,999999
@ 13,18 GET XMODE PICT "!!!"
@ 13,55 GET XVIA PICT "!!!!!!!!!!"
@ 15,18 GET XNAAM PICT "XXXXXXXXXXXXXXXXXXX"
@ 17,18 GET XRIG PICT "!!!!!!!!!!!!!!!!!!!"
@ 17,51 GET XWATT PICT "9999" RANGE 0,9999
@ 19,18 GET XREMARKS PICT "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
ENDCASE
RETURN
* -- Store Data From DBF File Into Variable Names LOGBOEK --
CASE ActionFL = "RETRIEVE"
* -- From Screen B:LOGBOEK --
XDATUM = DATUM
XFREQ = FREQ
XSTATION = STATION
XTIME = TIME
XSEND = SEND
XRECEIVED = RECEIVED
XQRA = QRA
XAFSTAND = AFSTAND
XMODE = MODE
XVIA = VIA
XNAAM = NAAM
XRIG = RIG
XWATT = WATT
XREMARKS = REMARKS
RETURN
* -- Put Data From Variable Names Into DBF File LOGBOEK --
CASE ActionFL = "REPLACE"
* -- From Screen B:LOGBOEK --
REPLACE DATUM WITH XDATUM,FREQ WITH XFREQ,STATION WITH XSTATION
REPLACE TIME WITH XTIME,SEND WITH XSEND,RECEIVED WITH XRECEIVED
REPLACE QRA WITH XQRA,AFSTAND WITH XAFSTAND,MODE WITH XMODE,VIA WITH XVIA
REPLACE NAAM WITH XNAAM,RIG WITH XRIG,WATT WITH XWATT
REPLACE REMARKS WITH XREMARKS
RETURN
OTHERWISE
@ 0,0
@ 0,0 SAY "Invalid Action Word "+ActionFL+". Press Any Key."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
@ 0,0
RETURN
ENDCASE
RETURN