home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
500
/
498
/
mail.prg
< prev
next >
Wrap
Text File
|
1986-06-30
|
42KB
|
1,292 lines
* MAIL.PRG (MAIL MONSTER)
* WRITTEN BY PETER T. DYER
* DATE: 9/20/85 REVISED 06/24/86
* PURPOSE OF PROGRAM IS TO PROVIDE A GENERAL MAILING SYSTEM.
* FEATURES INCLUDE ADDING, EDITING, CHECKING FOR DUPLICATION
* REMOVING, AND PRINTING MAILING LABELS BY ALPHA, BY ZIPCODE, AND BY
* CATEGORY OR CATEGORIES.
* DATA BASE IS MAIL.DBF INDEXES ARE FOUND IN LINES 78, 82, AND 86
CLEAR
SET SAFETY OFF
SET HEADING OFF
SET DELIMITER OFF
SET BELL OFF
SET CONFIRM ON
SET TALK OFF
RESTORE FROM CATLIST ADDITIVE
RESTORE FROM MACHINE ADDITIVE
IF CATMONT = 'C'
SET COLOR TO GR+/
ENDIF
@ 05,18 SAY "▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓"
@ 06,18 SAY " ▓▓▓ ▓▓ ▓▓▓ ▓▓▓ ▓▓"
@ 07,18 SAY " ▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓▓ ▓▓"
@ 08,18 SAY " ▓▓▓ ▓▓▓ ▓▓▓ ▓▓"
@ 09,18 SAY "▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓"
@ 10,18 SAY "da Bes' dBASE Software"
@ 12,15 SAY "╔═══════════════════════════════════════════════╗"
@ 13,15 SAY "║ (c) Copyrighted 1986 by Peter T. Dyer ║"
@ 14,15 SAY "╚═══════════════════════════════════════════════╝"
@ 16,15 SAY "Distributed as PUBLIC DOMAIN software. Permission"
@ 17,15 SAY "to copy and distribute this software is given so"
@ 18,15 SAY "long as full credit is given to the author. The"
@ 19,15 SAY "software may not be sold, although fees of up to"
@ 20,15 SAY "ten dollars (USA) may be assessed to cover costs."
@ 23,15 SAY " PRESS [ENTER] TO CONTINUE."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
READ
CLEAR
DO WHILE .T.
CLEAR
USE MAIL
GO BOTTOM
IF MACHINE = 'F' .AND. RECNO() > 350
SET COLOR TO GR+/
@ 01,08 SAY "YOU ARE RUNNING OUT OF SPACE ON DISK. MOVE DATA TO HARD DISK"
SET COLOR TO 7/0
ENDIF
STORE ' ' TO CHOICE
@ 02,20 SAY "╔══════════════════════════════════════╗"
@ 03,20 SAY "║ ║"
@ 04,20 SAY "║ M A I L M O N S T E R ║"
@ 05,20 SAY "║ MAILING LABEL SYSTEM ║"
@ 06,20 SAY "║ * 1.4 * ║"
@ 07,20 SAY "║ (C) Copyrighted 1986 ║"
@ 08,20 SAY "║ by Peter T. Dyer ║"
@ 09,20 SAY "║ ║"
@ 10,20 SAY "╚══════════════════════════════════════╝"
SET COLOR TO GR+/
@ 04,29 SAY "M A I L M O N S T E R"
@ 10,36 SAY " M E N U "
SET COLOR TO 7/0
@ 12,20 SAY "A) ADD NAMES TO MAILING LIST"
@ 13,20 SAY "E) EDIT NAMES ON MAILING LIST"
@ 14,20 SAY "D) CHECK AND MARK DUPLICATE MAILING LABELS"
@ 15,20 SAY "P) PRINT MAILING LABELS BY CATEGORIES"
@ 16,20 SAY "R) REMOVE DUPLICATE MAILING LABELS"
@ 17,20 SAY "S) REMOVE SINGLE MAILING LABEL"
@ 18,20 SAY "I) RESET THE INDEXES ON DATA FILES"
@ 19,20 SAY "C) CREATE SPECIAL CATEGORIES and SET MONITOR"
@ 20,20 SAY "X) EXIT TO DISK OPERATING SYSTEM PROMPT"
@ 22,20 SAY " MAKE SELECTION >>" GET CHOICE
SET COLOR TO GR+/0
@ 12,20 SAY "A"
@ 13,20 SAY "E"
@ 14,20 SAY "D"
@ 15,20 SAY "P"
@ 16,20 SAY "R"
@ 17,20 SAY "S"
@ 18,20 SAY "I"
@ 19,20 SAY "C"
@ 20,20 SAY "X"
SET COLOR TO 7/0
READ
STORE UPPER(CHOICE) TO CHOICE
DO CASE
CASE .NOT. CHOICE $ 'AEDRCSIPX'
@ 23,20 SAY "WRONG LETTER * PRESS [RETURN] * RE-ENTER"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
STORE ' ' TO CHOICE
LOOP
CASE CHOICE = 'X'
CLEAR
@ 08,21 SAY "╔══════════════════════════════════════╗"
@ 09,21 SAY "║ THAT'S ALL FOLKS! ║"
@ 10,21 SAY "║ ║"
@ 11,21 SAY "║ PRESS [SPACE BAR] TO FINISH ║"
@ 12,21 SAY "╚══════════════════════════════════════╝"
@ 15,06 SAY "Should you enjoy using MAIL MONSTER and would like to receive other,"
@ 16,06 SAY "similarly useful IBM PC PROGRAMS, simply send a note with your name,"
@ 17,06 SAY "address, and $10.00 (to encourage good work) to the following:"
@ 19,33 SAY "Peter T. Dyer"
@ 20,33 SAY "138 Kuuhale Street"
@ 21,33 SAY "Kailua, HI 96734"
@ 23,0 SAY " "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
STORE TIME() TO CLOCK
@ 10,25 SAY " OPERATION COMPLETE.....GOOD-BYE !"
@ 12,25 SAY " SIGNING OFF AT "
@ 12,46 SAY CLOCK
SET COLOR TO GR+/
@ 14,25 SAY " A L O H A F R O M H A W A I I"
@ 23,0 SAY " "
SET COLOR TO 7/0
STORE 1 TO DELAY
DO WHILE DELAY < 300
STORE DELAY + 1 TO DELAY
ENDDO
RELEASE DELAY
CLEAR
CLOSE DATABASES
QUIT
* ======= CREATE CATEGORIES FOR GROUPING MAILINGS
CASE CHOICE = 'C'
CLEAR
STORE ' ' TO CATMONT
STORE ' ' TO MACHINE
STORE SPACE(30) TO CAT1
STORE SPACE(30) TO CAT2
STORE SPACE(30) TO CAT3
STORE SPACE(30) TO CAT4
STORE SPACE(30) TO CAT5
STORE SPACE(30) TO CAT6
STORE SPACE(30) TO CAT7
STORE SPACE(30) TO CAT8
STORE SPACE(30) TO CAT9
STORE SPACE(30) TO CAT10
STORE SPACE(30) TO CAT11
STORE SPACE(30) TO CAT12
STORE SPACE(30) TO CAT13
STORE SPACE(30) TO CAT14
STORE SPACE(30) TO CAT15
STORE SPACE(30) TO CAT16
RESTORE FROM CATLIST ADDITIVE
RESTORE FROM MACHINE ADDITIVE
@ 03,05 SAY "Enter (or edit) the categories you wish to use to indicate"
@ 04,05 SAY "a special designation or group to which a person, or an"
@ 05,05 SAY "organization, or a company belongs. Once you have defined"
@ 06,05 SAY "the groups, you must also give each one a letter code."
@ 08,05 SAY "The format is <CODE> = <DESCRIPTION OF GROUP>"
@ 10,05 SAY "You are LIMITED to 30 CHARACTERS per category."
@ 12,05 SAY "ENTER (or EDIT) CATEGORIES IN BOXES BELOW:"
@ 14,05 GET CAT1
@ 14,42 GET CAT2
@ 15,05 GET CAT3
@ 15,42 GET CAT4
@ 16,05 GET CAT5
@ 16,42 GET CAT6
@ 17,05 GET CAT7
@ 17,42 GET CAT8
@ 18,05 GET CAT9
@ 18,42 GET CAT10
@ 19,05 GET CAT11
@ 19,42 GET CAT12
@ 20,05 GET CAT13
@ 20,42 GET CAT14
@ 21,05 GET CAT15
@ 21,42 GET CAT16
@ 23,25 SAY "PRESS [PgDN] KEY TO CONTINUE."
READ
CLEAR
@ 09,12 SAY "╔══════════════════════════════════════════════════════╗"
@ 10,12 SAY "║ Type of Monitor (Monochrome or Color) You Are Using. ║"
@ 11,12 SAY "║ ║"
@ 12,12 SAY "║ Enter M or C ==> ║"
@ 13,12 SAY "╚══════════════════════════════════════════════════════╝"
@ 12,47 GET CATMONT
READ
STORE UPPER(CATMONT) TO CATMONT
CLEAR
IF CATMONT = 'C'
SET COLOR TO GR+/
ENDIF
IF CATMONT = 'M'
SET COLOR TO 7/0
ENDIF
CLEAR
@ 09,14 SAY "╔═══════════════════════════════════════════════════╗"
@ 10,14 SAY "║ Are You Using a Floppy Disk or Hard Disk System. ║"
@ 11,14 SAY "║ ║"
@ 12,14 SAY "║ Enter F or H ==> ║"
@ 13,14 SAY "╚═══════════════════════════════════════════════════╝"
@ 12,49 GET MACHINE
READ
CLEAR
@ 09,24 SAY "╔═══════════════════════════════╗"
@ 10,24 SAY "║ UPDATING CONFIGURATION FILE. ║"
@ 11,24 SAY "╚═══════════════════════════════╝"
STORE UPPER(MACHINE) TO MACHINE
SAVE ALL LIKE MACHINE TO MACHINE
SAVE ALL LIKE CAT????? TO CATLIST
CLEAR
* ====== STARTING TO REBUILD ALL INDEXES
CASE CHOICE = 'I'
CLEAR
@ 05,12 SAY "╔══════════════════════════════════════════════════╗"
@ 06,12 SAY "║ REINDEXING ALL FILES. THIS TAKES A LONG WHILE. ║"
@ 07,12 SAY "║ ║"
@ 08,12 SAY "║ BEST TO TAKE A BREAK. HAVE A HOT CUP OF COFFEE! ║"
@ 09,12 SAY "║ ║"
@ 10,12 SAY "║ I'LL BEEP AT YOU WHEN DONE WITH THIS CHORE. ║"
@ 11,12 SAY "╚══════════════════════════════════════════════════╝"
@ 14,0 SAY " "
CLOSE DATABASES
USE MAIL
INDEX ON LAST_NAME+FIRST_NAME TO ALPHNAME
?' '
?' ....THE ALPHABETICAL INDEX HAS NOW BEEN RESET....'
?' '
INDEX ON ADDRESS1 TO DUPEADDR
?' '
?' ....THE CHECK FOR DUPLICATES INDEX HAS NOW BEEN RESET....'
?' '
INDEX ON ZIPCODE+LAST_NAME TO ZIPNAME
?' '
?' ....THE ZIPCODE INDEX HAS NOW BEEN RESET....'
?' '
CLEAR
@ 12,28 SAY "╔════════════════════════╗"
@ 13,28 SAY '║ REINDEXING COMPLETE. ║'
@ 14,28 SAY "╚════════════════════════╝"
? CHR(7)
? CHR(7)
? CHR(7)
? CHR(7)
? CHR(7)
STORE 1 TO DELAY
DO WHILE DELAY <100
STORE DELAY + 1 TO DELAY
ENDDO
RELEASE DELAY
STORE DATE() TO LASTSERC
SAVE ALL LIKE LASTSERC TO DUPEDATE
STORE DATE() TO LASTINDX
SAVE ALL LIKE LASTINDX TO INDXDATE
CLEAR
* ====== ROUTINE TO ADD NEW RECORDS
CASE CHOICE = 'A'
RESTORE FROM CATLIST ADDITIVE
CLEAR
STORE 'Y' TO RUNADD
DO WHILE RUNADD = 'Y'
USE MAIL
SET INDEX TO ALPHNAME
STORE SPACE(19) TO CHKLNAME
STORE SPACE(15) TO CHKFNAME
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
@ 11,20 SAY "LAST NAME (or name of company/organization)"
@ 13,33 GET CHKLNAME
@ 15,20 SAY "FIRST NAME (or more of company/organization)"
@ 17,33 GET CHKFNAME
@ 19,20 SAY " TO ABORT - ENTER [EX] FOR LAST NAME."
READ
STORE CHKLNAME + CHKFNAME TO CHKFULL
IF CHKLNAME = 'EX'
CLEAR
EXIT
ENDIF
IF CHKFULL = ' '
STORE "BLANK" TO CHKFULL
ENDIF
SEEK CHKFULL
IF CHKFULL = LAST_NAME+FIRST_NAME
CLEAR
@ 09,12 SAY "╔═════════════════════════════════════════════════════╗"
@ 10,12 SAY "║ PERSON OR COMPANY OR ORGANIZATION ALREADY IN FILE. ║"
@ 11,12 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 12,12 SAY "╚═════════════════════════════════════════════════════╝"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
IF CHKFULL = 'BLANK'
CLEAR
@ 10,23 SAY "╔═══════════════════════════════╗"
@ 11,23 SAY "║ YOU ENTERED BLANKS FOR NAMES ║"
@ 12,23 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 13,23 SAY "╚═══════════════════════════════╝"
@ 23,0 SAY ' '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
CLEAR
DO WHILE .T.
STORE ' ' TO ML1
STORE ' ' TO ML2
STORE ' ' TO ML3
STORE ' ' TO ML4
STORE ' ' TO ML5
STORE ' ' TO ML6
STORE ' ' TO ML7
STORE ' ' TO ML8
STORE ' ' TO ML9
STORE ' ' TO ML10
@ 02,21 SAY " ENTER CATEGORY OF LISTING "
@ 04,21 SAY "CHOOSE FROM AMONG THE FOLLOWING SEVERAL "
@ 05,21 SAY "COMBINATIONS. YOU MAY SPECIFY UP TO 10."
@ 07,21 SAY "CATEGORY 1" GET ML1
@ 07,47 SAY "CATEGORY 2" GET ML2
@ 08,21 SAY "CATEGORY 3" GET ML3
@ 08,47 SAY "CATEGORY 4" GET ML4
@ 09,21 SAY "CATEGORY 5" GET ML5
@ 09,47 SAY "CATEGORY 6" GET ML6
@ 10,21 SAY "CATEGORY 7" GET ML7
@ 10,47 SAY "CATEGORY 8" GET ML8
@ 11,21 SAY "CATEGORY 9" GET ML9
@ 11,46 SAY "CATEGORY 10" GET ML10
@ 13,21 SAY " WHEN DONE PRESS [PgDn] KEY TO CONTINUE."
@ 15,16 SAY "LISTED BELOW ARE THE CURRENTLY DEFINED CATEGORIES"
@ 17,12 SAY CAT1
@ 17,45 SAY CAT2
@ 18,12 SAY CAT3
@ 18,45 SAY CAT4
@ 19,12 SAY CAT5
@ 19,45 SAY CAT6
@ 20,12 SAY CAT7
@ 20,45 SAY CAT8
@ 21,12 SAY CAT9
@ 21,45 SAY CAT10
@ 22,12 SAY CAT11
@ 22,45 SAY CAT12
@ 23,12 SAY CAT13
@ 23,45 SAY CAT14
@ 24,12 SAY CAT15
@ 24,45 SAY CAT16
READ
CLEAR
STORE ML1 + ML2 + ML3 + ML4 + ML5 + ML6 + ML7 + ML8 + ML9 + ML10 TO MLTYPE
CLEAR
APPEND BLANK
REPLACE LAST_NAME WITH CHKLNAME
REPLACE FIRST_NAME WITH CHKFNAME
REPLACE CATEGORY WITH MLTYPE
@ 3,02 SAY "ADD NEW LISTING INFORMATION TO MAIL MONSTER"
@ 5,02 SAY "MAILING CATEGORIES ARE " GET CATEGORY
@ 7,2 SAY "LAST NAME"
@ 7,13 GET LAST_NAME
@ 9,2 SAY "FIRST NAME"
@ 9,14 GET FIRST_NAME
@ 11,2 SAY "STREET ADDRESS"
@ 11,18 GET ADDRESS1
@ 12,18 GET ADDRESS2
@ 14,2 SAY "CITY"
@ 14,8 GET CITY
@ 14,35 SAY "STATE"
@ 14,42 GET STATE
@ 14,50 SAY "ZIPCODE"
@ 14,59 GET ZIPCODE PICT '99999-9999'
@ 16,2 SAY "HOME PHONE"
@ 16,14 GET PHONE1 PICT '999-999-9999'
@ 16,35 SAY "BUSINESS PHONE"
@ 16,51 GET PHONE2 PICT '999-999-9999'
@ 20,24 SAY "PRESS [PgDn] KEY TO CONTINUE"
READ
STORE SPACE(19) TO CHKLNAME
STORE SPACE(15) TO CHKFNAME
STORE SPACE(10) TO MLTYPE
CLEAR
STORE 'Y' TO AGAIN
@ 11,18 SAY "╔══════════════════════════════════════════╗"
@ 12,18 SAY "║ DO YOU WANT TO ADD ANOTHER NAME (Y/N)? ║"
@ 13,18 SAY "╚══════════════════════════════════════════╝"
@ 12,59 GET AGAIN
READ
IF AGAIN = 'Y'
CLEAR
EXIT
ELSE
CLEAR
STORE 'N' TO RUNADD
EXIT
ENDIF
CLEAR
ENDDO
CLEAR
ENDDO
* ===== START OF EDIT RECORD SEGMENT
CASE CHOICE = 'E'
CLEAR
RESTORE FROM CATLIST ADDITIVE
RESTORE FROM INDXDATE ADDITIVE
STORE ' ' TO ANSWER
@ 12,23 SAY "YOU LAST INDEXED FILE ON " GET LASTINDX PICT '99/99/99'
CLEAR GETS
@ 14,23 SAY " REINDEX DATA BASE (Y/N)? " GET ANSWER
READ
CLEAR
IF ANSWER = 'Y'
@ 09,13 SAY "╔══════════════════════════════════════════════════╗"
@ 10,13 SAY "║ PATIENCE WHILE DATA BASE IS REINDEXED. ║"
@ 11,13 SAY "║ THIS COULD TAKE A WHILE. HAVE A CUP OF COFFEE! ║"
@ 12,13 SAY "╚══════════════════════════════════════════════════╝"
@ 23,0 SAY ' '
USE MAIL
INDEX ON LAST_NAME+FIRST_NAME TO ALPHNAME
SET INDEX TO ALPHNAME
STORE DATE() TO LASTINDX
SAVE ALL LIKE LASTINDX TO INDXDATE
ELSE
USE MAIL
SET INDEX TO ALPHNAME
ENDIF
DO WHILE .T.
CLEAR
STORE SPACE(19) TO MLAST
STORE SPACE(15) TO MFIRST
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
@ 11,21 SAY "LAST NAME OF PERSON (or Company) TO EDIT "
@ 13,34 GET MLAST
@ 15,21 SAY "FIRST NAME OF PERSON (or Company) TO EDIT "
@ 17,34 GET MFIRST
@ 19,21 SAY " TO ABORT - ENTER [EX] FOR LAST NAME."
READ
STORE MLAST + MFIRST TO FULLNAME
IF MLAST = ' '
STORE "BLANK" TO FULLNAME
ENDIF
IF MLAST = 'EX'
CLEAR
EXIT
ENDIF
SEEK FULLNAME
CLEAR
IF FULLNAME = 'BLANK'
CLEAR
@ 10,25 SAY "╔═══════════════════════════════╗"
@ 11,25 SAY "║ YOU ENTERED BLANKS FOR NAMES ║"
@ 12,25 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 13,25 SAY "╚═══════════════════════════════╝"
@ 23,0 SAY ' '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
IF EOF()
CLEAR
@ 10,20 SAY "╔══════════════════════════════════════════╗"
@ 11,20 SAY "║ RECORD OF NAME OR COMPANY NOT FOUND ║"
@ 12,20 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 13,20 SAY "╚══════════════════════════════════════════╝"
@ 23,0 SAY ' '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
IF FULLNAME = LAST_NAME + FIRST_NAME
* =====ENTER EDIT SCREEN
@ 1,02 SAY "EDIT OLD ENTRY YOU HAVE PLACED IN MAIL MONSTER"
@ 3,02 SAY "CATEGORY CODE(S) ARE " GET CATEGORY
@ 5,2 SAY "LAST NAME"
@ 5,13 GET LAST_NAME
@ 7,2 SAY "FIRST NAME"
@ 7,14 GET FIRST_NAME
@ 09,2 SAY "STREET ADDRESS"
@ 09,18 GET ADDRESS1
@ 10,18 GET ADDRESS2
@ 12,2 SAY "CITY"
@ 12,8 GET CITY
@ 12,35 SAY "STATE"
@ 12,42 GET STATE
@ 12,50 SAY "ZIPCODE"
@ 12,59 GET ZIPCODE PICT '99999-9999'
@ 14,2 SAY "HOME PHONE"
@ 14,14 GET PHONE1 PICT '999-999-9999'
@ 14,35 SAY "BUSINESS PHONE"
@ 14,51 GET PHONE2 PICT '999-999-9999'
@ 16,11 SAY CAT1
@ 16,43 SAY CAT2
@ 17,11 SAY CAT3
@ 17,43 SAY CAT4
@ 18,11 SAY CAT5
@ 18,43 SAY CAT6
@ 19,11 SAY CAT7
@ 19,43 SAY CAT8
@ 20,11 SAY CAT9
@ 20,43 SAY CAT10
@ 21,11 SAY CAT11
@ 21,43 SAY CAT12
@ 22,11 SAY CAT13
@ 22,43 SAY CAT14
@ 23,11 SAY CAT15
@ 23,43 SAY CAT16
@ 24,24 SAY "PRESS [PgDn] KEY TO CONTINUE"
READ
CLEAR
STORE 'N' TO AGAIN
@ 11,18 SAY "╔═══════════════════════════════════════════╗"
@ 12,18 SAY "║ DO YOU WANT TO EDIT ANOTHER NAME (Y/N)? ║"
@ 13,18 SAY "╚═══════════════════════════════════════════╝"
@ 12,60 GET AGAIN
READ
IF AGAIN = 'Y'
CLEAR
LOOP
ELSE
CLEAR
EXIT
ENDIF
ENDIF
ENDDO
CLEAR
CASE CHOICE = 'S'
CLEAR
RESTORE FROM CATLIST ADDITIVE
RESTORE FROM INDXDATE ADDITIVE
STORE ' ' TO ANSWER
@ 12,23 SAY "YOU LAST INDEXED FILE ON " GET LASTINDX PICT '99/99/99'
CLEAR GETS
@ 14,23 SAY " REINDEX DATA BASE (Y/N)? " GET ANSWER
READ
CLEAR
IF ANSWER = 'Y'
@ 10,12 SAY "╔══════════════════════════════════════════════════╗"
@ 11,12 SAY "║ PATIENCE WHILE DATA BASE IS REINDEXED. ║"
@ 12,12 SAY "║ THIS COULD TAKE A WHILE. HAVE A CUP OF COFFEE! ║"
@ 13,12 SAY "╚══════════════════════════════════════════════════╝"
@ 23,0 SAY ' '
USE MAIL
INDEX ON LAST_NAME + FIRST_NAME TO ALPHNAME
SET INDEX TO ALPHNAME
STORE DATE() TO LASTINDX
SAVE ALL LIKE LASTINDX TO INDXDATE
ELSE
USE MAIL
SET INDEX TO ALPHNAME
ENDIF
DO WHILE .T.
CLEAR
STORE SPACE(19) TO MLAST
STORE SPACE(15) TO MFIRST
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
@ 11,20 SAY "LAST NAME OF PERSON (or Company) TO DELETE"
@ 13,33 GET MLAST
@ 15,20 SAY "FIRST NAME OF PERSON (or Company) TO DELETE"
@ 17,33 GET MFIRST
@ 19,20 SAY " TO ABORT - ENTER [EX] FOR LAST NAME."
READ
STORE MLAST+MFIRST TO FULLNAME
IF MLAST = ' '
STORE "BLANK" TO FULLNAME
ENDIF
IF MLAST = 'EX'
CLEAR
EXIT
ENDIF
SEEK FULLNAME
CLEAR
IF FULLNAME = 'BLANK'
CLEAR
@ 10,25 SAY "╔═══════════════════════════════╗"
@ 11,25 SAY "║ YOU ENTERED BLANKS FOR NAMES ║"
@ 12,25 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 13,25 SAY "╚═══════════════════════════════╝"
@ 23,0 SAY ' '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
IF EOF()
CLEAR
@ 10,20 SAY "╔══════════════════════════════════════════╗"
@ 11,20 SAY "║ RECORD OF NAME OR COMPANY NOT FOUND ║"
@ 12,20 SAY "║ PRESS [ENTER] TO CONTINUE. ║"
@ 13,20 SAY "╚══════════════════════════════════════════╝"
@ 23,0 SAY ' '
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
ENDIF
IF FULLNAME = LAST_NAME + FIRST_NAME
* =====ENTER EDIT SCREEN
@ 1,02 SAY "CHECK TO SEE IF THIS IS THE RECORD TO DELETE."
@ 3,02 SAY "CATEGORY CODE(S) ARE " GET CATEGORY
@ 5,2 SAY "LAST NAME"
@ 5,13 GET LAST_NAME
@ 7,2 SAY "FIRST NAME"
@ 7,14 GET FIRST_NAME
@ 09,2 SAY "STREET ADDRESS"
@ 09,18 GET ADDRESS1
@ 10,18 GET ADDRESS2
@ 12,2 SAY "CITY"
@ 12,8 GET CITY
@ 12,35 SAY "STATE"
@ 12,42 GET STATE
@ 12,50 SAY "ZIPCODE"
@ 12,59 GET ZIPCODE PICT '99999-9999'
@ 14,2 SAY "HOME PHONE"
@ 14,14 GET PHONE1 PICT '999-999-9999'
@ 14,35 SAY "BUSINESS PHONE"
@ 14,51 GET PHONE2 PICT '999-999-9999'
@ 16,11 SAY CAT1
@ 16,43 SAY CAT2
@ 17,11 SAY CAT3
@ 17,43 SAY CAT4
@ 18,11 SAY CAT5
@ 18,43 SAY CAT6
@ 19,11 SAY CAT7
@ 19,43 SAY CAT8
@ 20,11 SAY CAT9
@ 20,43 SAY CAT10
@ 21,11 SAY CAT11
@ 21,43 SAY CAT12
@ 22,11 SAY CAT13
@ 22,43 SAY CAT14
@ 23,11 SAY CAT15
@ 23,43 SAY CAT16
@ 24,26 SAY "PRESS [PgDn] KEY TO CONTINUE"
READ
CLEAR
STORE 'N' TO REMOVE
@ 11,18 SAY "╔════════════════════════════════════════════╗"
@ 12,18 SAY "║ DO YOU WANT TO DELETE THIS RECORD (Y/N)? ║"
@ 13,18 SAY "╚════════════════════════════════════════════╝"
@ 12,61 GET REMOVE
READ
IF REMOVE = 'Y'
CLEAR
DELETE
ELSE
CLEAR
EXIT
ENDIF
ENDIF
ENDDO
CLEAR
* ===== BEGIN DUPLICATE RECORD CHECK SEGMENT
CASE CHOICE = 'D'
CLOSE DATABASES
CLEAR
SET CONFIRM ON
SET HEADING OFF
SET SAFETY OFF
RESTORE FROM DUPEDATE ADDITIVE
STORE ' ' TO ANSWER
@ 12,23 SAY "YOU LAST INDEXED FILE ON " GET LASTSERC PICT '99/99/99'
CLEAR GETS
@ 14,23 SAY " REINDEX DATA BASE (Y/N)? " GET ANSWER
READ
CLEAR
IF ANSWER = 'Y'
@ 10,13 SAY "╔══════════════════════════════════════════════════╗"
@ 11,13 SAY "║ PATIENCE WHILE DATA BASE IS REINDEXED. ║"
@ 12,13 SAY "║ THIS COULD TAKE A WHILE. HAVE A CUP OF COFFEE! ║"
@ 13,13 SAY "╚══════════════════════════════════════════════════╝"
@ 23,0 SAY ' '
USE MAIL
INDEX ON ADDRESS1 TO DUPEADDR
SET INDEX TO DUPEADDR
STORE DATE() TO LASTSERC
SAVE ALL LIKE LASTSERC TO DUPEDATE
ELSE
USE MAIL
SET INDEX TO DUPEADDR
ENDIF
CLEAR
STORE SPACE(20) TO NAME1
STORE 0 TO CTR
STORE 0 TO DUPECTR
DO WHILE .NOT. EOF()
STORE ADDRESS1 TO NAME1
SKIP
STORE CTR + 1 TO CTR
STORE ADDRESS1 TO NAME2
IF NAME1 <> NAME2
@ 10,25 SAY "CHECKING FOR DUPLICATE RECORDS."
@ 12,25 SAY " CHECKED SO FAR"
@ 14,33 SAY CTR
@ 16,25 SAY " DELETED SO FAR"
@ 18,33 SAY DUPECTR
ENDIF
IF NAME1 = NAME2
CLEAR
? CHR(7)
@ 1,21 SAY "*** DUPLICATE RECORD FOUND ***"
@ 3,10 SAY "FIRST RECORD"
@ 4,13 GET FIRST_NAME
@ 5,13 GET LAST_NAME
@ 6,13 GET ADDRESS1
@ 7,13 GET ADDRESS2
@ 8,13 GET CITY
@ 9,13 GET PHONE1
@ 9,28 GET CATEGORY
@ 10,10 SAY " "
CLEAR GETS
SKIP -1
@ 11,10 SAY "SECOND RECORD"
@ 12,13 GET FIRST_NAME
@ 13,13 GET LAST_NAME
@ 14,13 GET ADDRESS1
@ 15,13 GET ADDRESS2
@ 16,13 GET CITY
@ 17,13 GET PHONE1
@ 17,28 GET CATEGORY
@ 19,10 SAY " "
CLEAR GETS
STORE ' ' TO NAME1
STORE 'N' TO DUPGO
@ 19,13 SAY "DO YOU WANT TO DELETE SECOND RECORD (Y/N)? " GET DUPGO
@ 21,14 SAY " PRESS [PgDn] IN ORDER TO CONTINUE"
@ 22,14 SAY ' DUPLICATE RECORD SEARCH. '
READ
IF DUPGO = 'Y'
STORE DUPECTR + 1 TO DUPECTR
SKIP
DELE
CLEAR
ELSE
@ 23,0 SAY ' '
SKIP
CLEAR
ENDIF
ENDIF
IF EOF()
CLEAR
? CHR(7)
? CHR(7)
@ 10,21 SAY "╔═══════════════════════════════════════╗"
@ 11,21 SAY "║ LAST OF THE DUPLICATE RECORDS FOUND. ║"
@ 12,21 SAY "║ SEARCH IS ENDING. ║"
@ 13,21 SAY "╚═══════════════════════════════════════╝"
@ 22,0 SAY " "
STORE 0 TO DELAY
DO WHILE DELAY < 45
STORE DELAY + 1 TO DELAY
ENDDO
STORE 0 TO DELAY
@ 23,0 SAY CHR(7)
@ 24,0 SAY CHR(7)
CLEAR
ENDIF
ENDDO
* ===== END DUPLICATE RECORD CHECK RECORD SEGMENT
* ===== BEGIN REMOVING RECORDS MARKED AS DUPLICATE SEGMENT
CASE CHOICE = 'R'
CLEAR
CLOSE DATA
STORE ' ' TO DONE
@ 10,10 SAY "╔═══════════════════════════════════════════════════════════╗"
@ 11,10 SAY "║ YOU MUST HAVE FIRST RUN THE CHECK FOR DUPLICATES ROUTINE. ║"
@ 12,10 SAY "║ IF YOU HAVE RUN THE DUPLICATES CHECK PRESS ENTER. ║"
@ 13,10 SAY "║ IF YOU HAVE NOT RUN ROUTINE ENTER [X] ==> ║"
@ 14,10 SAY "╚═══════════════════════════════════════════════════════════╝"
@ 13,59 GET DONE
READ
STORE UPPER(DONE) TO DONE
IF DONE = 'X'
CLEAR
LOOP
ENDIF
CLEAR
@ 11,13 SAY "╔═══════════════════════════════════════════════════╗"
@ 12,13 SAY "║ REMOVING RECORDS MARKED AS DUPLICATE....PATIENCE! ║"
@ 13,13 SAY "╚═══════════════════════════════════════════════════╝"
USE MAIL
PACK
INDEX ON LAST_NAME + FIRST_NAME TO ALPHNAME
?' '
?' ....THE ALPHABETICAL INDEX HAS NOW BEEN RESET....'
?' '
INDEX ON ADDRESS1 TO DUPEADDR
?' '
?' ....THE CHECK FOR DUPLICATES INDEX HAS NOW BEEN RESET....'
?' '
INDEX ON ZIPCODE+LAST_NAME TO ZIPNAME
?' '
?' ....THE ZIPCODE INDEX HAS NOW BEEN RESET....'
?' '
CLEAR
@ 10,13 SAY "╔═══════════════════════════════════════════════════╗"
@ 11,13 SAY "║ REINDEXING COMPLETE. ║"
@ 12,13 SAY "║ ALL RECORDS MARKED AS DUPLICATE HAVE BEEN REMOVED.║"
@ 13,13 SAY "║ PRESS [ENTER] TO RETURN TO MENU. ║"
@ 14,13 SAY "╚═══════════════════════════════════════════════════╝"
? CHR(7)
? CHR(7)
? CHR(7)
? CHR(7)
? CHR(7)
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEAR
LOOP
CASE CHOICE = 'P'
CLEAR
SET DELETED ON
CLEAR
STORE ' ' TO MAKE
STORE ' ' TO MZIP
STORE ' ' TO CAT
STORE ' ' TO ORDER
@ 07,22 SAY "╔═════════════════════════════════════╗"
@ 08,22 SAY "║ ║"
@ 09,22 SAY "║ ENTER CHOICE OF SORT AND CATEGORY ║"
@ 10,22 SAY "║ ║"
@ 11,22 SAY "║ T) SET-UP LABELS TEST ║"
@ 12,22 SAY "║ ║"
@ 13,22 SAY "║ A) ALPHA LISTING ║"
@ 14,22 SAY "║ ║"
@ 15,22 SAY "║ Z) ZIP CODE LISTING ║"
@ 16,22 SAY "║ ║"
@ 17,22 SAY "║ O) OTHER LISTING ║"
@ 18,22 SAY "║ ║"
@ 19,22 SAY "║ SELECT ==> ║"
@ 20,22 SAY "║ ║"
@ 21,22 SAY "╚═════════════════════════════════════╝"
SET COLOR TO GR+/
@ 11,31 SAY "T"
@ 13,31 SAY "A"
@ 15,31 SAY "Z"
@ 17,31 SAY "O"
SET COLOR TO 7/0
@ 19,46 GET MAKE
READ
CLEAR
STORE UPPER(MAKE) TO MAKE
IF MAKE = 'T'
CLOSE DATABASES
USE MAIL
@ 10,22 SAY "╔═════════════════════════════════╗"
@ 11,22 SAY "║ BE SURE PRINTER IS TURNED ON. ║"
@ 12,22 SAY "║ PRESS [ENTER] KEY WHEN READY. ║"
@ 13,22 SAY "╚═════════════════════════════════╝"
SET CONSOLE OFF
WAIT
DO WHILE .T.
SET PRINT ON
?"XX TOP XXXXXXXXXXXXXXXXXX TOP XX"
?"XXXXXXXX ALIGN PRINTER XXXXXXXXX"
?"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
?"XXXXXXXXXX THAT'S IT XXXXXXXXXXX"
?"XX BOTTOM XXXXXXXXXXXX BOTTOM XX"
? CHR(13)
SET PRINT OFF
SET CONSOLE ON
CLEAR
STORE 'N' TO ALIGN
@ 11,13 SAY "╔═════════════════════════════════════════════════════╗"
@ 12,13 SAY "║ DO YOU WANT TO CHECK LABEL ALIGNMENT AGAIN (Y/N)? ║"
@ 13,13 SAY "╚═════════════════════════════════════════════════════╝"
@ 12,65 GET ALIGN
READ
IF ALIGN = 'Y'
CLEAR
LOOP
ELSE
CLEAR
EXIT
ENDIF
ENDDO
ENDIF
IF MAKE = "A"
CLOSE DATA
USE MAIL
CLEAR
@ 11,14 SAY "╔══════════════════════════════════════════════════╗"
@ 12,14 SAY "║ INDEXING THE FILES...PATIENCE WITH THIS MACHINE! ║"
@ 13,14 SAY "╚══════════════════════════════════════════════════╝"
@ 23,0 SAY " "
INDEX ON LAST_NAME+FIRST_NAME TO ALPHNAME
SET INDEX TO ALPHNAME
CLEAR
STORE 1 TO UP
STORE 'N' TO OPTION
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
SET COLOR TO GR+/
@ 11,20 SAY " BE SURE PRINTER IS TURNED ON!"
SET COLOR TO 7/0
@ 13,20 SAY ' USE "OR CURRENT RESIDENT" OPTION? ' GET OPTION PICT 'A'
@ 15,20 SAY " DO YOU WANT ONE, TWO OR THREE-UP LABELS? " GET UP PICT '#' RANGE 1, 3
@ 17,20 SAY " (Enter 1, 2, or 3)"
@ 19,20 SAY " PRESS [ENTER] WHEN ALL READY."
READ
CLEAR
IF UP = 1 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP1 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP2 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP3 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 1 .AND. OPTION = 'Y'
LABEL FORM MAILUP1A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION = 'Y'
LABEL FORM MAILUP2A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION = 'Y'
LABEL FORM MAILUP3A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
CLOSE DATA
ENDIF
IF MAKE = "Z"
CLOSE DATA
USE MAIL
CLEAR
@ 11,14 SAY "╔══════════════════════════════════════════════════╗"
@ 12,14 SAY "║ INDEXING THE FILES...PATIENCE WITH THIS MACHINE! ║"
@ 13,14 SAY "╚══════════════════════════════════════════════════╝"
@ 23,0 SAY " "
INDEX ON ZIPCODE + FIRST_NAME TO ZIPNAME
SET INDEX TO ZIPNAME
CLEAR
STORE 1 TO UP
STORE 'N' TO OPTION
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
SET COLOR TO GR+/
@ 11,20 SAY " BE SURE PRINTER IS TURNED ON!"
SET COLOR TO 7/0
@ 13,20 SAY ' USE "OR CURRENT RESIDENT" OPTION? ' GET OPTION PICT 'A'
@ 15,20 SAY " DO YOU WANT ONE, TWO OR THREE-UP LABELS? " GET UP PICT '#' RANGE 1, 3
@ 17,20 SAY " (Enter 1, 2, or 3)"
@ 19,20 SAY " PRESS [ENTER] WHEN ALL READY."
READ
CLEAR
IF UP = 1 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP1 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP2 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP3 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 1 .AND. OPTION = 'Y'
LABEL FORM MAILUP1A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION = 'Y'
LABEL FORM MAILUP2A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION = 'Y'
LABEL FORM MAILUP3A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
CLOSE DATA
ENDIF
IF MAKE = 'O'
STORE ' ' TO T1
STORE ' ' TO T2
STORE ' ' TO T3
DO WHILE .T.
USE MAIL
GO TOP
RESTORE FROM CATLIST ADDITIVE
STORE ' ' TO ORDER
@ 05,15 SAY "ENTER ZIPCODE IF DESIRED " GET MZIP PICT '99999'
@ 06,15 SAY "(Leave Blank if not used)"
@ 08,15 SAY "ENTER CATEGORIES OF LABELS DESIRED"
@ 08,51 GET T1
@ 08,54 GET T2
@ 08,57 GET T3
@ 09,15 SAY "(Choose UP TO THREE from list below)"
@ 11,15 SAY "ENTER ORDER OF LABELS (ALPHA OR ZIPCODE) " GET ORDER PICT 'A'
@ 12,15 SAY " (A) for alpha (Z) for zipcode"
@ 14,15 SAY "LISTED BELOW ARE THE CURRENTLY DEFINED CATEGORIES"
@ 16,11 SAY CAT1
@ 16,43 SAY CAT2
@ 17,11 SAY CAT3
@ 17,43 SAY CAT4
@ 18,11 SAY CAT5
@ 18,43 SAY CAT6
@ 19,11 SAY CAT7
@ 19,43 SAY CAT8
@ 20,11 SAY CAT9
@ 20,43 SAY CAT10
@ 21,11 SAY CAT11
@ 21,43 SAY CAT12
@ 22,11 SAY CAT13
@ 22,43 SAY CAT14
@ 23,11 SAY CAT15
@ 23,43 SAY CAT16
READ
CLEAR
STORE T1+T2+T3 TO CAT
IF T1 = ' '
STORE "#" TO T1
ENDIF
IF T2 = ' '
STORE "#" TO T2
ENDIF
IF T3 = ' '
STORE "#" TO T3
ENDIF
DO CASE
CASE CAT <> ' ' .AND. MZIP <> ' '
COPY TO TFILE FOR '&T1' $ CATEGORY .OR. '&T2' $ CATEGORY ;
.OR. '&T3' $ CATEGORY .AND. ZIPCODE = MZIP
CASE MZIP <> ' ' .AND. CAT = ' '
COPY TO TFILE FOR ZIPCODE = MZIP
CASE MZIP = ' ' .AND. CAT <> ' '
COPY TO TFILE FOR '&T1' $ CATEGORY .OR. '&T2' $ CATEGORY ;
.OR. '&T3' $ CATEGORY
CASE MZIP = ' ' .AND. CAT = ' ' .AND. ORDER <> ' '
COPY TO TFILE
CASE MZIP = ' ' .AND. CAT = ' ' .AND. ORDER = ' '
CLEA
@ 10,21 SAY "╔══════════════════════════════════════════╗"
@ 11,21 SAY "║ YOU MUST ENTER AT LEAST ONE SORT FIELD. ║"
@ 12,21 SAY "║ PRESS [ENTER] AND PROVIDE ONE FIELD. ║"
@ 13,21 SAY "╚══════════════════════════════════════════╝"
@ 23,0 SAY " "
SET CONSOLE OFF
WAIT
SET CONSOLE ON
STORE ' ' TO T1
STORE ' ' TO T2
STORE ' ' TO T3
CLEA
LOOP
ENDCASE
IF ORDER = 'Z'
CLOSE DATABASES
USE TFILE
CLEAR
@ 11,14 SAY "╔══════════════════════════════════════════════════╗"
@ 12,14 SAY "║ INDEXING THE FILES...PATIENCE WITH THIS MACHINE! ║"
@ 13,14 SAY "╚══════════════════════════════════════════════════╝"
INDEX ON ZIPCODE+LAST_NAME TO TEMPINDX
SET INDEX TO TEMPINDX
CLEAR
STORE 1 TO UP
STORE 'N' TO OPTION
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
SET COLOR TO GR+/
@ 11,20 SAY " BE SURE PRINTER IS TURNED ON!"
SET COLOR TO 7/0
@ 13,20 SAY ' USE "OR CURRENT RESIDENT" OPTION? ' GET OPTION PICT 'A'
@ 15,20 SAY " DO YOU WANT ONE, TWO OR THREE-UP LABELS? " GET UP PICT '#' RANGE 1, 3
@ 17,20 SAY " (Enter 1, 2, or 3)"
@ 19,20 SAY " PRESS [ENTER] WHEN ALL READY."
READ
CLEAR
IF UP = 1 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP1 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP2 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP3 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 1 .AND. OPTION = 'Y'
LABEL FORM MAILUP1A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION = 'Y'
LABEL FORM MAILUP2A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION = 'Y'
LABEL FORM MAILUP3A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
CLOSE DATA
DELE FILE TFILE.DBF
DELE FILE TEMPINDX.NTX
EXIT
ELSE
CLOSE DATABASES
USE TFILE
CLEAR
@ 11,14 SAY "╔══════════════════════════════════════════════════╗"
@ 12,14 SAY "║ INDEXING THE FILES...PATIENCE WITH THIS MACHINE! ║"
@ 13,14 SAY "╚══════════════════════════════════════════════════╝"
INDEX ON LAST_NAME + FIRST_NAME TO TEMPINDX
SET INDEX TO TEMPINDX
CLEAR
STORE 1 TO UP
STORE 'N' TO OPTION
@ 09,18 SAY "╔═══════════════════════════════════════════════╗"
@ 10,18 SAY "║ ║"
@ 11,18 SAY "║ ║"
@ 12,18 SAY "║ ║"
@ 13,18 SAY "║ ║"
@ 14,18 SAY "║ ║"
@ 15,18 SAY "║ ║"
@ 16,18 SAY "║ ║"
@ 17,18 SAY "║ ║"
@ 18,18 SAY "║ ║"
@ 19,18 SAY "║ ║"
@ 20,18 SAY "║ ║"
@ 21,18 SAY "╚═══════════════════════════════════════════════╝"
SET COLOR TO GR+/
@ 11,20 SAY " BE SURE PRINTER IS TURNED ON!"
SET COLOR TO 7/0
@ 13,20 SAY ' USE "OR CURRENT RESIDENT" OPTION? ' GET OPTION PICT 'A'
@ 15,20 SAY " DO YOU WANT ONE, TWO OR THREE-UP LABELS? " GET UP PICT '#' RANGE 1, 3
@ 17,20 SAY " (Enter 1, 2, or 3)"
@ 19,20 SAY " PRESS [ENTER] WHEN ALL READY."
READ
CLEAR
IF UP = 1 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP1 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP2 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION <> 'Y'
LABEL FORM MAIL_UP3 TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 1 .AND. OPTION = 'Y'
LABEL FORM MAILUP1A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 2 .AND. OPTION = 'Y'
LABEL FORM MAILUP2A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
IF UP = 3 .AND. OPTION = 'Y'
LABEL FORM MAILUP3A TO PRINT
SET PRINT ON
? CHR(13)
SET PRINT OFF
ENDIF
CLOSE DATA
DELE FILE TFILE.DBF
DELE FILE TEMPINDX.NTX
EXIT
ENDIF
ENDDO
ENDIF
SET DELETED OFF
CLEAR
ENDCASE
ENDDO