* Last revision: April 17, 1986 at 18:54 * duprec.prg SKIP -1 STOR lastname TO lastname1 STOR fname TO fname1 STOR company1 TO company11 STOR caddress TO address1 STOR phone TO phone1 STOR ophone TO ophone1 STOR cs1 TO cs11 STOR cs2 TO cs21 STOR update TO update1 * find out if this record is marked for deletion IF DELETE() STOR 'DELETED' TO deleted1 ELSE STOR ' ' TO deleted1 ENDI * return to the second duplicate record and get its data SKIP STOR lastname TO lastname2 STOR fname TO fname2 STOR company1 TO company12 STOR caddress TO address2 STOR phone TO phone2 STOR ophone TO ophone2 STOR cs1 TO cs12 STOR cs2 TO cs22 STOR update TO update2 * find out if this record is marked for deletion IF DELETE() STOR 'DELETED' TO deleted2 ELSE STOR ' ' TO deleted2 ENDI * set up the loop STOR .t. TO more DO WHIL more * set up the screen format and variables CLEA STOR 'ontinue, elete/Recall or uit' TO prompt STOR 'RECORDS WITH DUPLICATE LASTNAMES' TO mode STOR ' ' TO command STOR ' ' TO record * show both records and find out what to do next @ 01,20 SAY mode @ 02,00 SAY line @ 03,33 SAY 'RECORD A' @ 04,00 SAY 'Lastname: ' @ 04,10 SAY lastname1 @ 04,40 SAY 'First & MI: ' @ 04,53 SAY fname1 @ 05,01 SAY 'Company: ' @ 05,10 SAY company11 @ 06,01 SAY 'Address: ' @ 06,10 SAY address1 @ 07,02 SAY 'Office: ' @ 07,10 SAY ophone1 @ 07,40 SAY 'Home phone: ' @ 07,53 SAY phone1 @ 08,04 SAY 'List: ' @ 08,10 SAY cs11 @ 08,14 SAY 'Code: ' @ 08,22 SAY cs21 @ 08,39 SAY 'Last update: ' @ 08,53 SAY update1 @ 08,70 SAY deleted1 @ 09,00 SAY line @ 10,33 SAY 'RECORD B' @ 11,00 SAY 'Lastname: ' @ 11,10 SAY lastname2 @ 11,40 SAY 'First & MI: ' @ 11,53 SAY fname2 @ 12,01 SAY 'Company: ' @ 12,10 SAY company12 @ 13,01 SAY 'Address: ' @ 13,10 SAY address2 @ 14,02 SAY 'Office: ' @ 14,10 SAY ophone2 @ 14,40 SAY 'Home phone: ' @ 14,53 SAY phone2 @ 15,04 SAY 'List: ' @ 15,10 SAY cs12 @ 15,14 SAY 'Code: ' @ 15,22 SAY cs21 @ 15,39 SAY 'Last update: ' @ 15,53 SAY update2 @ 15,70 SAY deleted2 @ 16,00 SAY line @ 17,17 SAY prompt @ 18,33 SAY 'SELECT:' @ 18,44 GET command PICTURE '!' @ 19,00 @ 20,00 @ 21,00 @ 22,00 READ IF command = 'D' ?? ' Which Record ? ' SET CONSOLE OFF WAIT TO record SET CONSOLE on STOR UPPER(record) TO record ?? record ENDI command = D IF record = 'A' SKIP -1 ENDI record = a DO CASE CASE command = 'C' .OR. command = 'Q' STOR .f. to more1 EXIT CASE command = 'D' IF DELETE() RECA ELSE DELE ENDI deleted IF record = 'A' IF deleted1 = 'Deleted' STOR ' ' TO deleted1 ELSE STOR 'Deleted' TO deleted1 ENDI deleted1 ENDI record = A IF record = 'B' IF deleted2 = 'Deleted' STOR ' ' TO deleted2 ELSE STOR 'Deleted' TO deleted2 ENDI deleted2 ENDI record = A ENDC IF record = 'A' SKIP ENDI record = A ENDD while more IF command = 'C' STOR .t. TO more1 ENDI command = C RETU