home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db3mail.zip / STARTP.PRG < prev    next >
Text File  |  1986-01-09  |  22KB  |  778 lines

  1.  
  2.  
  3. **************************************************************"
  4. *         Set up menu for Address file manager"
  5. *         Written by Glenn R. Abelson"
  6. *                    P.O. Box 1031"
  7. *                    Rockville Ctr. NY 11571"
  8. *  If this came to you for free - a contribution would be nice"
  9. *  Last update 05/12/85
  10. PROC START
  11. SET SAFE OFF
  12. CLEA
  13. TEXT
  14.         This is a free program I wrote for dBASE III.  
  15.  
  16.         If you use it, and like it -- a contribution between
  17.  
  18.         $5 and $30 would be appreciated.
  19.  
  20.  
  21.  More important, however, to me... pass my name along to anyone wanting or
  22.  needed a custom written sales application. 
  23.  
  24.  Thank you.
  25.  
  26.                           GLENN R. ABELSON
  27.                           P.O. BOX 1031
  28.                           ROCKVILLE CTR. NY 11571
  29.  
  30.                           516-766-7782
  31. ENDT
  32. WAIT
  33. PUBL mfil
  34. CLEA
  35. DO WHIL .T.
  36. CLEA
  37. ?
  38. ?
  39. ?"                >>>>>>>>  ADDRESS FILE SETUP MENU <<<<<<<<"
  40. ?
  41. ?"                         1.  Use address file"
  42. ?
  43. ?"                         2.  Set Path (if different directory)"
  44. ?
  45. ?"                         3.  Change default drive/colors"
  46. ?
  47. ?'                         Q.  dBase prompt " . " '
  48. ?
  49. ?"                         X.  Quit to DOS"
  50. ?
  51. ?"                After setup, instructions for main program"
  52. ?"                are available from MAIN MENU letter H." 
  53. ?
  54. @ 19,0 SAY "Copyright 1985 GLENN ABELSON, P.O. BOX 1031, ;
  55. ROCKVILLE CTR. NY 11571"
  56. WAIT TO CHOICE
  57. DO CASE CHOICE
  58. CASE CHOICE = "1"
  59. CLEA
  60. DO ADDRESS
  61. CASE CHOICE = "2"
  62. ACCE 'What is path (i.e. b:\dbase )... ' to mpath
  63. SET PATH TO &mpath   
  64. CASE CHOICE = "3"
  65. ACCE "What drive is to be default drive. " to mdef
  66. SET DEFA TO &mdef
  67. ?
  68. ?
  69. ?"                 *******  SET UP FILE DEFAULTS ******"
  70. ?
  71. ?"                          1.  SET COLORS"
  72. ?
  73. ?"                          Return - to main menu"
  74. ?
  75. WAIT TO SETUPS
  76. DO CASE SETUPS
  77. CASE SETUPS = "1"
  78. ?"Colors - black - space bar    blue - B   green - G"
  79. ?"         cyan  - BG           red  - R   magenta-BR  "
  80. ?"         brown - GR           white - W or RB "      
  81. ?"MONOCHROME ONLY   U - underline"
  82. set color to w+/ ,w/ ,                             
  83. ?" HIGH INTESITY - add  +  after color"
  84. set color to w+*/ ,w/ ,  
  85. ?" BLINKING - add  *  after color"
  86. set color to w+/ ,w/ ,  
  87. STOR '    ' TO mfore
  88. STOR '    ' to mback
  89. STOR '    ' to mdat
  90. STOR '    ' to mdatb
  91. STOR '    ' to mbord
  92. ACCE "Select a foreground color, by number for headings... " to ;
  93.  mfore
  94. ACCE "Select a background color, by number for headings... " to ;
  95.   mback
  96.   ACCE "Select a foreground color, by number for data... " to ;
  97.   mdat
  98.   Acce "Select a background color, by number for data... " to ;
  99.   mdatb
  100.   ACCE "Select a border color... " to mbord
  101. SET COLO TO &mfore/&mback,&mdat/&mdatb,&mbord
  102. ?
  103. ?      "Make these default start up colors Y/N? ... "         
  104. WAIT TO SETCOL
  105. DO CASE SETCOL           
  106. CASE UPPE(SETCOL) ="Y"
  107. SET SAFE OFF
  108. SAVE ALL LIKE COLO* TO COLOR.MEM     
  109. SET SAFE ON   
  110. DO ADDRESS
  111. OTHE
  112. CLEA
  113. ENDC
  114. ENDD
  115. OTHE
  116. ENDC SETUPS
  117. ENDD
  118. DO ADDRESS
  119. CASE CHOICE = "2"
  120. ACCE "What is path be (i.e.  \dbase) ... " TO MPATH
  121. SET PATH TO &MPATH
  122. CASE UPPER(CHOICE) = "Q"
  123. CANCEL
  124. CASE UPPER(CHOICE) = "X"
  125. CLEA ALL
  126. QUIT
  127. ENDC
  128. ENDD
  129. PROC ADDRESS
  130. REST FROM COLOR.MEM
  131. CLEA
  132. SET BELL OFF
  133. SELE 1
  134. USE ADDRESS INDEX KEY,COMPANY,LAST
  135. DO WHIL .T.
  136. CLEA
  137. ?"  ******************** ADDRESS FILE MANAGER ********************"
  138. ?"                     1.  Add a record "
  139. ?"                     2.  Find/Change/Review/Index records"
  140. ?"                     3.  Browse through names in general*"
  141. ?"                         Best area to add $ Paid & Due"
  142. ?"                     4.  List records "
  143. ?
  144. ?"                     5.  Print lists or labels*"
  145. ?"                     6.  Send  names to Mail Merge*"
  146. ?
  147. ?"                     *.  Set filter on/off to explanation "        
  148. ?"                     !.  Set any filter off"      
  149. ?
  150. ?"                     7.  DELETE RECORDS        "
  151. ?"                     8.  AUTOMATIC MAINTENCE"
  152. ?
  153. ?"                     E.  Error notes"     
  154. ?"                     H.  Help/Instructions"
  155. ?"                     S.  SAVE AND CONTINUE"           
  156. ?"                     Q.  TO dBase Prompt "         
  157. ?"                     X.  Quit to DOS"
  158. ?"                     Return to Main Menu"
  159. ?"                     (Return from any menu brings"
  160. ?"                      you up one level)."
  161. WAIT TO ACTION
  162.  DO CASE ACTION
  163. CASE ACTION = "1"
  164. do xxaddnam          
  165. CLEA  
  166. USE
  167. SELE 1
  168. USE ADDRESS INDE KEY,COMPANY,LAST
  169. CASE ACTION = "2"
  170. SET INDE TO
  171. DO LOOKFOR
  172. CASE ACTION = "3"
  173. DO SETFIL
  174. BROW
  175. CLEA
  176. CASE ACTION = "4"
  177. DO LISTFOR
  178. CASE ACTION = "5"
  179. DO SETFIL  
  180. DO LABELS   
  181. CASE ACTION = "6"
  182. DO SETFIL  
  183. DO MAILMERG
  184. CASE ACTION = "7"
  185. DO GETRIDOF 
  186. CASE ACTION = "*"
  187. DO FILTER
  188. CASE ACTION = "!"
  189. SET FILTER TO
  190. ? " FILTER IS OFF"
  191. CASE ACTION = "8"
  192. DO MAILFIX
  193. CASE UPPE(ACTION) = "E"
  194. DO ERNOTE
  195. CASE UPPER(ACTION) = "H"
  196. DO HELP
  197. CASE UPPER(ACTION) = "S"
  198. CLOSE DATABASES
  199. select 1
  200. USE ADDRESS INDEX KEY,COMPANY,LAST
  201. CLEA
  202. CASE UPPER(ACTION) = "Q"
  203. USE
  204. CANCEL
  205. CASE UPPER(ACTION) = "X"
  206. CLOS DATABASES
  207. QUIT
  208. OTHE
  209. CLOS DATABASES
  210. CLEA
  211. RETU
  212. ENDC
  213. ENDD
  214. PROC DRIVES
  215. ?
  216. ?"Current default drive is drive for which you set program files "
  217. ?"enter new default drive..."
  218. ?"or else press Return"
  219. ACCE "New default drive is... " to mdef
  220. set default to &mdef
  221. CLEA
  222. return
  223. PROC ERNOTE
  224. ?
  225. ?" COMMON ERRORS: "
  226. ?
  227. ?"   1.  Variable not found -  you either/or:"
  228. ?'                did not enclose a string in "quotes" '
  229. ?"                did not spell a field name right"
  230. ?"                put a comma anyplace but between field names"
  231. ?
  232. ?"   2.  Syntax error - unrecognized phrase"
  233. ?"                the idea is right, the format is not"       
  234. ?
  235. ?
  236. ?"   3.  Can't find or file not accessible -"
  237. ?"                from   .   prompt try CLEA ALL"
  238. ?"                you may have exceeded memory limits"
  239. ?"                file could be in a different directory"
  240. ?
  241. ?"   4.  Alias already in use - "
  242. ?"                usually occurs when dropping in and out"
  243. ?"                of programs.   From   .   prompt type"
  244. ?"                CLOSE DATABASES"
  245. ?"                Re start program."
  246. ?
  247. ?"   See manual for more"  
  248. wait
  249. PROC F
  250.  ACCE "Type field name... " to mfield
  251.  ACCE "Type string to locate... " to mstring
  252. LIST COMPANY, &mfield FOR ("&mstring"$&mfield)
  253. ?
  254. ?"No record listings means there are no matches."
  255. ?"To edit a particular record, note its # and select #4 from menu. "
  256. wait
  257. PROC FILTER 
  258. CLEA
  259. ?" Filters instruct the database/file manager to pretend that ;
  260. only the records that meet the filter conditions actually exist."
  261. ?
  262. ?" You can, for example set a filter to tell the database to ;
  263. find, list, mailmerge, print labels or whatever -- but only for ;
  264. names where the LAST name begins with A AND/OR the STATE is not ;
  265. NY."
  266. ?
  267. ?" On the three submenus that allow filters to be set, the format ;
  268. is -- > FIELD (field name) , CONDITION [ =, <>, >, < ], STRING ;
  269. (the information you want to find or restrict - IN DOUBLE ;
  270. QUOTES)."
  271. ?
  272. ?"To set multiple conditions, follow above with  .AND.  .NOT.  or ;
  273. .OR.  (include .  on either side), and enter second format."
  274. ?
  275. ? 'An example would be   LAST = "A"  for all last names ;
  276. beginning with A '
  277. ?
  278. ?' SEE TUTORIAL AND MANUAL FOR MORE ON CORRECT SYNTAX '
  279. wait
  280. return                         
  281. PROC GETRIDOF
  282. CLEA
  283. DO WHIL .T.
  284. ?" Find record numbers with Change/Edit commands."
  285. ?" 1. Delete a record."
  286. ?" 2. Bring back  deleted records."      
  287. ?" 3. Destroy deleted records from database. "
  288. ?
  289. ?
  290. WAIT TO GETRIDOF  
  291. DO CASE GETRIDOF
  292. CASE GETRIDOF = "1"
  293. ACCE "Number of record to delete... " to mdel
  294. delete record &mdel
  295. CASE GETRIDOF = "2"
  296. ACCE "Number of record to restore... " to mres
  297. recall record &mres
  298. CASE GETRIDOF = "3"
  299. ACCE "Permanently remove deleted records from ;
  300. database - press return... " to mdes
  301. SET INDEX TO 
  302. PACK &mdes
  303. INDEX ON LAST TO LAST
  304. INDEX ON COMPANY TO COMPANY
  305. INDEX ON KEY TO KEY
  306. OTHERWISE
  307. CLEA
  308. RETURN
  309. ENDCASE GETRIDOF
  310. ENDDO
  311. PROC HELP
  312. ?
  313. ?"    This program restricts error checking to new name"
  314. ?"    entry only.   Handling of errors from improper input"
  315. ?"    in other areas is best explained on submenu 2"
  316. ?
  317. wait
  318. CLEA
  319. ?" 1. To add names, prepare a 7 string/number for your key."
  320. ?"    This is to prevent duplication in entering names."
  321. ?"    Several alternatives would be:"
  322. ?"     ... First letter of first name, two of second name and"
  323. ?"         and a two digit number -- Joseph Jones might read"
  324. ?"         KEY jjo01  (use upper or lower case, but be"
  325. ?"         consistent)"
  326. ?"     ... First two of first name, and three of second"
  327. ?"     ... A number, but its hard to associate names that way"
  328. ?
  329. ?"     Database is also indexed by last name and company."
  330. ?
  331. ?" 2. Use #2 when you know the name, string, record #, or some "
  332. ?"    data about what you are looking for -- A NO FIND will "
  333. ?"    return you to the main menu -- a FIND will continue past"
  334. ?"    the parameters you requested with PgUP or PgDn"
  335. ?
  336. ?" 3. Use this option if you are not sure what you want to find."
  337. ?"    IN  BROWSE MODE,  F1 gives more help, ESC returns to menu."
  338. wait
  339. ?
  340. ?" 4. You may select the fields you wish to list.  If you have "
  341. ?"    some knowledge of dBASE you may add extensions and conditions"
  342. ?"    to your field list -- like  TO PRINT  or  FOR LAST = ? "
  343. ?
  344. ?"   The remainder items are pretty self explanatory." 
  345. ?
  346. ?"   BEFORE DELETING - use list or search to find the records to ;
  347. "
  348. ?"   delete.  When in any edit mode  CTRL/U will delete (but not ;
  349. "
  350. ì
  351. ?"   destroy) that record.  Only PACK (from delete menu) will"
  352. ?"   eradicate records."
  353. ?
  354. ?"   The FILTER set restricts output to the conditions you set, "
  355. ?"   or until you turn the filter off with  !  . "
  356. ?
  357. ?"   The LABEL and MAILMERGE programs are preset.  You may "
  358. ?"   develop others through dBase command mode or  F2  menu."
  359. wait
  360. CLEA
  361. PROC LABELS
  362. DO WHIL .T.
  363. CLEA
  364. set escape off
  365. ?"                   LABEL PRINTING PROGRAM"
  366. ?"          You will be able to establish guidelines"
  367. ?
  368. ?"               ONE    Single row labels"
  369. ?"               TWO    Two across labels"
  370. ?"             THREE    Three across labels"
  371. ?"              FOUR    Four across labels"
  372. ?
  373. ?"                  ========================"
  374. ?"                    RETURN - 2X TO EXIT"  
  375. ?"                  ========================"       
  376. ?
  377. ?"                    MAIL CODE -- PRESS #"
  378. ?"                        A          1"
  379. ?"                        B          2"
  380. ?"                        C          3"
  381. ?"                       AB          4"
  382. ?"                       AC          5"
  383. ?"                       BC          6"
  384. ?"                  ENTIRE LIST      7"
  385. ?
  386. SELECT 1
  387. ACCE "Label type (ONE  etc.) please... " to mlabl
  388. WAIT  " code... " TO LBL
  389. DO CASE LBL
  390. CASE LBL = "1"
  391. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="A"
  392. CASE LBL = "2"
  393. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="B"
  394. CASE LBL = "3"
  395. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="C"
  396. CASE LBL = "4"
  397. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="A" .OR. X="B"
  398. CASE LBL = "5"
  399. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="A" .OR. X="C"
  400. CASE LBL = "6"
  401. LABEL FORM &MLABL TO PRINT SAMPLE FOR X="C" .OR. X = "B"
  402. CASE LBL = "7"
  403. LABEL FORM &MLABL TO PRINT SAMPLE
  404. OTHERWISE
  405. CLEA
  406. RETURN
  407. CLOSE DATABASE
  408. ENDCASE
  409. ENDDO
  410. PROC LISTFOR
  411. SELECT 1
  412. SET INDEX TO LAST 
  413. DO WHILE .T.
  414. CLEA
  415. ?' LISTS ARE PRESENTED ALPHABETICALLY BY LAST NAME'
  416. ?' Press ^PrtSc to toggle printer'
  417. ?
  418. ?" FIELDS - First, Last, Title, Phone, Company, Address, State," 
  419. ?
  420. ?"            Zip, Country, Postal, Crossref, Comments"
  421. ?
  422. ?" Number fields - DUE, Paid, Balance"
  423. ?
  424. ?" Use Ctrl/NumLock to stop scroll"
  425. ?
  426.  
  427. ACCE "Type each field, followed by a comma, that you want ;
  428. included in the list ........ " to mlist
  429.   IF mlist < "!"
  430.     CLEA
  431.     RETURN
  432.   ELSE
  433. LIST &mlist
  434. WAIT
  435. CLEA
  436. ENDIF
  437. ENDD 
  438. PROC LOOKFOR
  439. CLEA
  440. SET FORMAT TO ADDRESS
  441. DO WHILE .T.
  442. ?"--------------------------------------------------------------"
  443. ?"| In order to keep program from running too slow, extensive |"
  444. ?"| error checking has been omitted from this section.  If you|"
  445. ?"| enter wrong data, or no data, except off this menu, you   |"
  446. ?"| may get an error reading.  Continually pressing  N  to    |"
  447. ?"| Y/N will eventually return you to the program.            |"
  448. ?"-------------------------------------------------------------"
  449. ?
  450. ?
  451. ?"                        Search by"
  452. ?"                         1. KEY Index"
  453. ?"                         2. OTHER Index"
  454. ?"                         3. Other field(s)"
  455. ?"                         4. By record #"
  456. ?"                         5. Search from middle/end of a field."
  457. ?
  458. ?"                        Index (under normal conditions all"
  459. ?"                               indexes are auto updated)"
  460. ?"                         6. Reindex an indexed field"
  461. ?"                         7. Index on a new field(s)"
  462. ?        
  463. ?"                         8. Update BALANCES (Amt due - Amt paid) "
  464. ?  
  465. ?"                         Return to Menu"
  466. ?
  467. WAIT TO LOOKFOR
  468.   DO CASE LOOKFOR
  469.          CASE LOOKFOR = "1"
  470.          SET INDEX TO key 
  471.             ACCE "Key word or phrase ... Caps/lower case counts... " to mseek
  472.  
  473.             IF mseek <"!"
  474.                loop
  475.             ELSE      
  476.          FIND "&mseek"
  477.             IF .NOT. EOF()           
  478.               EDIT
  479.               CLEA
  480.             LOOP  
  481.               ELSE
  482.                 ? CHR(7)
  483.                 ?" CAN'T FIND IT"
  484.                 CLEA
  485.              LOOP      
  486. ENDIF
  487.         CASE LOOKFOR = "2"
  488.         ACCE "Index name (do not include  .NDX  extension)..." TO mindexi
  489.  
  490.             IF mindex = '       '
  491.                 CLEA
  492.             ELSE
  493.          SET INDEX TO &mindex
  494.             ACCE "What to look for ... " to mseek
  495.             IF mseek = '    ' 
  496.                 CLEA
  497.                  LOOP
  498.             ELSE
  499.          FIND "&mseek"
  500.             IF .NOT. EOF()
  501.          EDIT
  502.          CLEA
  503.         LOOP
  504.             ELSE
  505.                 CLEA
  506.      CASE LOOKFOR = "3"
  507.              DISP STRU
  508.             STORE '        ' to mfield
  509.             ACCE "Field to search... " to mfield
  510.             IF mfield = '    '
  511.                 CLEA
  512.             else
  513.          ACCE "Look for... "to mlook
  514.          LOCATE ALL FOR &mlook $ &mfield 
  515.          EDIT
  516.          CLEA
  517.             LOOP  
  518.      CASE LOOKFOR = "4"
  519.          ACCE "Record # to edit... " to medit
  520.          EDIT &medit
  521.          CLEA
  522.          LOOP 
  523.      CASE LOOKFOR = "5"
  524.           DISP STRU
  525.           *STRING SEARCH
  526.  ACCE "Type field name... " to mfield
  527.  ACCE "Type string to locate... " to mstring
  528. LIST COMPANY, &mfield FOR ("&mstring"$&mfield)
  529. ?
  530. ?"No record listings means there are no matches."
  531. ?"To edit a particular record, note its # and select #4 from menu. "
  532. wait
  533. * PROGRAM RETURNS TO LOOKFOR MENU 
  534.               
  535.          CLEA
  536.          LOOP 
  537.     CASE LOOKFOR = "6"
  538.          ?" INDEXED FIELDS ARE:"
  539.           DIR *.NDX
  540.   ACCE " WHICH ONE TO  REINDEX  (do not include  .NDX )..." to mrein
  541.    set index to &mrein
  542.    reindex
  543.    set index to
  544.    CLEA
  545.     LOOP 
  546.     CASE LOOKFOR = "7"
  547.          ?" INDEXED FIELDS ARE: "
  548.           DIR *.NDX
  549.      ACCE "NEW FIELD(S) TO INDEX... " TO MNEWIN
  550.      INDEX ON &MNEWIN TO &MNEWIN
  551.      LOOP 
  552.         CASE LOOKFOR = "8"
  553.      ?" REPLACING ALL  $BALANCE WITH   $AMOUNT DUE - $AMOUNT PAID"
  554.     SET TALK ON 
  555.     REPLACE ALL BALANCE WITH DUE - PAID FOR DUE > .01 .OR. PAID > .01
  556.      LOOP
  557. OTHERWISE    
  558.      CLEA
  559.      RETURN
  560.     ENDIF
  561.         ENDIF
  562.             ENDIF
  563.                 ENDIF
  564.                     ENDIF
  565.                         ENDIF 
  566. ENDCASE
  567. ENDDO
  568. PROC MAILFIX
  569. CLEA
  570.  DO WHILE .T.
  571. SET TALK ON
  572. USE address 
  573. ?" The 3 default indexes - KEY, LAST & COMPANY, will be updated."
  574. INDEX ON KEY TO KEY
  575. INDEX ON LAST TO LAST
  576. INDEX ON COMPANY TO COMPANY
  577. ?" Note the total number of RECORDS in database... if auto count ;
  578. = that #, file is okay, if it is lower, you have duplicates."
  579. display stru
  580. wait
  581. set index to key 
  582. count
  583. wait
  584. CLEA
  585. return
  586. PROC MAILMERG
  587. CLEA
  588. ?
  589. ?
  590. COPY TO MAILLIST.DAT FIELDS MR_S, FIRST, I, LAST, TITLE, COMPANY, ADDRESS, CITY, ;
  591. STATE, ZIP, COUNTRY, POSTAL  DELIMITED WITH "
  592.  
  593. WAIT
  594. CLEA
  595. return
  596. PROC SETFIL
  597. CLEA     
  598. SET MENU ON
  599. DO WHILE .T.
  600. TEXT
  601. Field list -- KEY, FIRST, LAST, COMPANY, STATE, DUE, PAID, BALANCE
  602. ------------------------------------------------------------------
  603. If you wish to instruct the database to behave as if only certain 
  604. types of accounts exist (i.e. NY state only,  Balance due only) 
  605. set a filter for that condition.  The syntax is ->
  606.  
  607. FIELD1 = "INFORMATION" .AND. FIELD2 > BALANCE         
  608.  
  609. In English this means  THE FIELD NAME (First, Last Company etc.)
  610. is TO EQUAL, NOT EQUAL, BE GREATER THAN, LESS THAN OR COMBO
  611.        =       <>           >               <         >=
  612. THE "DATA NON NUMERIC INFORMATION " or NUMBER (no quotes with #)
  613.                                        
  614. If more than one condition is to be set use .NOT. or .AND. or 
  615. .OR.  and start the FIELD = "STRING" all over again.
  616.  
  617. example -> STATE="NY"    example -> DUE > 0
  618. combination example -> STATE="NY" .AND. DUE > 0
  619. Use database only for names where state equals NY and amount due 
  620. is greater than 0
  621. ENDTEXT
  622. ACCE "Filter data or just return for none... " to mfil
  623. SET FILTER TO &mfil
  624. PROC XXADDNAM 
  625. CLOS DATABASES
  626. SELE 1
  627. USE ADDRESS INDEX KEY,COMPANY,LAST
  628. CLEA
  629. DO WHIL .T.
  630. CLEAR
  631. @ 5,10 SAY "RETURN on empty KEY exits"
  632. @ 6,0 SAY "KEY should be up to 7 letters/numbers to serve as quick find"
  633. @ 7,0 say "code for various accounts.  If key is not in use data will be"
  634. @ 8,0 say "entered.  If it is -- you will be shown where and how."
  635. ACCEPT 'Key code for new name ... ' TO m_key
  636. IF m_key <"!"
  637. USE
  638. CLEA
  639. RETURN
  640. ENDIF    
  641. SET TALK OFF
  642. SEEK "&m_key"
  643. IF .NOT. EOF()            
  644. ?" KEY IN USE: "
  645. SET HEADING OFF
  646. DISP KEY,FIRST,LAST,COMPANY WHILE KEY = '&m_key'
  647. SET HEADING ON 
  648. WAIT
  649. CLEA      
  650. LOOP
  651. ENDI
  652. CLEA
  653.  
  654. m_address  = Address   
  655. m_city     = City      
  656. m_comments = Comments  
  657. m_company  = Company   
  658. m_country  = Country   
  659. m_crossref = Crossref  
  660. m_date     = Date      
  661. m_first    = First     
  662. m_i        = I         
  663. m_last     = Last      
  664. m_mr_s     = Mr_s      
  665. m_nickname = Nickname  
  666. m_phone    = Phone     
  667. m_postal   = Postal    
  668. m_state    = State     
  669. m_title    = Title     
  670. m_x        = X         
  671. m_zip      = Zip       
  672. m_balance  = Balance   
  673. m_dues     = Due       
  674. m_paid     = Paid      
  675.  
  676. @ 2,0 SAY "KEY" 
  677. @ 2,4 get m_key
  678. @ 2,11 SAY "DATE" GET m_date            
  679. @ 2,30 SAY "-------------------------------------"
  680. @ 3,0 SAY "MR_S"
  681. @ 3,6 GET m_mr_s PICTURE "!X."
  682. @ 3,12 SAY "First"
  683. @ 3,19 GET m_first PICTURE "!XXXXXXXXXXXXXXXXXXX"
  684. @ 3,40 SAY "Initial"
  685. @ 3,49 GET m_i PICTURE "!X"
  686. @ 3,52 SAY "Last"
  687. @ 3,58 GET m_last PICTURE "!XXXXXXXXXXXXXXX"
  688. @ 5,0 SAY "Title"
  689. @ 5,7 GET m_title PICTURE "!XXXXXXXXXXXXXXXXX"
  690. @ 5,40 SAY "Nickname"
  691. @ 5,50 GET m_nickname PICTURE "!XXXXXXXXXXX"
  692. @ 5,62 SAY "MAILCODE A,B,C " GET m_x
  693. @ 6,0 SAY "-------------------------------------------------------"
  694. @ 6,55 SAY "-------------------------"
  695. @ 7,0 SAY "Telephone"
  696. @ 7,11 GET m_phone PICTURE "9-999-999-9999"
  697. @ 8,0 SAY "-------------------------------------------------------"
  698. @ 8,55 SAY "-------------------------"
  699. @ 9,0 SAY "COMPANY"
  700. @ 9,9 get m_company PICTURE "!XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  701. @ 10,0 SAY "ADDRESS"
  702. @ 10,9 GET m_address
  703. @ 11,3 SAY "CITY"
  704. @ 11,9 GET m_city PICTURE "!XXXXXXXXXXXXXXXXXXXX"
  705. @ 11,43 SAY "STATE"
  706. @ 11,50 GET m_state PICTURE "!!"
  707. @ 11,57 SAY "ZIP"
  708. @ 11,61 GET m_zip PICTURE "99999"
  709. @ 12,23 SAY "COUNTRY"
  710. @ 12,30 GET m_country PICTURE "!XXXXXXXXXXXXXXXXXXXX"
  711. @ 12,60 SAY "POSTAL"
  712. @ 12,70 GET m_postal
  713. @ 13,0 SAY "DUE $"
  714. @ 13,6 GET m_dues PICTURE "99999.99"
  715. @ 13,20 SAY "PAID $"
  716. @ 13,26 GET m_paid PICTURE "99999.99"
  717. @ 13,40 SAY "BALANCE DUE $"
  718. @ 13,53 GET m_balance PICTURE "99999.99"
  719. @ 14,0 SAY "See also"
  720. @ 14,10 GET m_crossref 
  721. @ 16,0 SAY "Comments"
  722. @ 16,10 GET m_comments
  723. @ 19,0 SAY "======================================================="
  724. @ 19,55 SAY "========================="
  725. DO WHIL .T.
  726.    @ 20,15 SAY "╔═══════════════════════════════════════════════════╗"
  727.    @ 21,15 SAY "║   Press any key to edit, <S> to Save changes,     ║"
  728.    @ 22,15 SAY "║   or ENTER to return to menu without saving...    ║"
  729.    @ 23,15 SAY "╚═══════════════════════════════════════════════════╝"
  730.  
  731. SET CONS OFF
  732. WAIT TO  CHOICE
  733. SET CONS ON
  734.  DO CASE
  735.    CASE ""=CHOICE
  736.     EXIT
  737.    CASE UPPER(CHOICE)="S"
  738.          APPEND BLANK
  739. REPLACE Address    WITH m_address 
  740. REPLACE City       WITH m_city    
  741. REPLACE Comments   WITH m_comments
  742. REPLACE Company    WITH m_company 
  743. REPLACE Country    WITH m_country 
  744. REPLACE Crossref   WITH m_crossref
  745. REPLACE Date       WITH m_date    
  746. REPLACE First      WITH m_first   
  747. REPLACE I          WITH m_i       
  748. REPLACE Key        WITH m_key     
  749. REPLACE Last       WITH m_last    
  750. REPLACE Mr_s       WITH m_mr_s    
  751. REPLACE Nickname   WITH m_nickname
  752. REPLACE Phone      WITH m_phone   
  753. REPLACE Postal     WITH m_postal  
  754. REPLACE State      WITH m_state   
  755. REPLACE Title      WITH m_title   
  756. REPLACE X          WITH m_x       
  757. REPLACE Zip        WITH m_zip     
  758. REPLACE Balance    WITH m_balance 
  759. REPLACE Due        WITH m_dues     
  760. REPLACE Paid       WITH m_paid    
  761.  
  762. @ 24,1 SAY "NAME ADDED"
  763. ?CHR(7)
  764. EXIT
  765.     OTHERWISE
  766.      @ 20,0 CLEAR
  767.      @ 22,20 say "PgDn ends entries"
  768.      READ SAVE
  769.      LOOP
  770. ENDCASE CHOICE
  771. ENDD
  772. CLEA
  773. ENDDO
  774.  
  775.  
  776.  
  777.