home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / propmgr2.zip / SEARCH.ACG < prev    next >
Text File  |  1986-09-03  |  3KB  |  145 lines

  1. * DATE 08/27/84  12:45
  2. * search.cmd
  3. STOR t TO first
  4. STOR t TO more
  5. STOR CHR(PEEK (063)) TO dr
  6. DO WHIL more
  7.  IF first
  8.   ERAS
  9.   STOR 'Search for record by <L>ast name or <A>ny data in data base' TO prompt1
  10.   STOR '<B>ackward or <F>orward, <D>elete/Recall' TO prompt2
  11.   STOR '<E>dit, <P>rint, or <Q>uit searching' TO prompt3
  12.   STOR 'Record Search Module' TO mode
  13.   @ 1,25 SAY mode
  14.   @ 2, 0 SAY "+---------------------------------------"
  15.   @ 2,39 SAY "---------------------------------------+"
  16.   @ 3, 3 SAY "Lastname:"
  17.   @ 3,46 SAY "First & MI:"
  18.   @ 4, 5 SAY "Spouse:"
  19.   @ 4,46 SAY "Address as:"
  20.   @ 6, 6 SAY "Title:"
  21.   @ 7, 1 SAY "Company #1:"
  22.   @ 8, 9 SAY "#2:"
  23.   @ 9, 0 SAY "Co. Address:"
  24.   @ 9,51 SAY "Suite:"
  25.   @ 10, 7 SAY "City:"
  26.   @ 10,36 SAY "ST:"
  27.   @ 10,53 SAY "Zip:"
  28.   @ 12, 2 SAY "Home Addr:"
  29.   @ 12,53 SAY "Apt:"
  30.   @ 13, 7 SAY "City:"
  31.   @ 13,36 SAY "ST:"
  32.   @ 13,53 SAY "Zip:"
  33.   @ 14, 2 SAY "Telephone  Office:"
  34.   @ 14,46 SAY "Home phone:"
  35.   @ 15, 1 SAY "Salutation:"
  36.   @ 15,42 SAY "Send to office:"
  37.   @ 16, 4 SAY "Codes 1-"
  38.   @ 16,21 SAY "2-"
  39.   @ 16,32 SAY "3-"
  40.   @ 16,43 SAY "4-"
  41.   @ 16,55 SAY "5-"
  42.   @ 16,66 SAY "6-"
  43.   @ 17,50 SAY "Update:"
  44.   @ 18, 0 SAY "+---------------------------------------"
  45.   @ 18,39 SAY "---------------------------------------+"
  46.   @ 19,12 SAY prompt1
  47.   @ 20,12 SAY prompt2
  48.   @ 21,12 SAY prompt3
  49.  ENDI first
  50.  STOR f TO first
  51.  STOR 'L' TO command
  52.  STOR '                          ' to name
  53.  IF *
  54.   STOR 'Deleted' TO deleted
  55.  ELSE
  56.   STOR '       ' TO deleted
  57.  ENDI *
  58.  @ 1, 0 SAY deleted
  59.  @ 3,13 SAY lastname
  60.  @ 3,58 SAY fname
  61.  @ 4,13 SAY spouse
  62.  @ 4,58 SAY mr
  63.  @ 6,13 SAY title
  64.  @ 7,13 SAY company1
  65.  @ 8,13 SAY company2
  66.  @ 9,13 SAY caddress
  67.  @ 9,58 SAY suite
  68.  @ 10,13 SAY ccity
  69.  @ 10,41 SAY cst
  70.  @ 10,58 SAY czip
  71.  @ 12,13 SAY address
  72.  @ 12,58 SAY apt
  73.  @ 13,13 SAY city
  74.  @ 13,41 SAY st
  75.  @ 13,58 SAY zip
  76.  @ 14,21 SAY ophone
  77.  @ 14,58 SAY phone
  78.  @ 15,13 SAY dear
  79.  @ 15,58 SAY send
  80.  @ 16,13 SAY cs1
  81.  @ 16,24 SAY cs2
  82.  @ 16,35 SAY cs3
  83.  @ 16,46 SAY cs4
  84.  @ 16,58 SAY cs5
  85.  @ 16,69 SAY cs6
  86.  @ 17,58 SAY update
  87.  @ 22,46 SAY "What next?"
  88.  @ 22,57 GET command picture '!'
  89.  READ
  90.  DO CASE
  91.  CASE command = 'A'
  92.   DO search1.acg
  93.  CASE (command = 'B' .OR. command = ',')
  94.   SKIP -1
  95.  CASE command = 'D'
  96.   IF *
  97.    RECA
  98.   ELSE
  99.    DELE
  100.   ENDI
  101.  CASE (command = 'F' .OR. command = '.')
  102.   SKIP
  103.  CASE command = 'E'
  104.   DO edit.acg
  105.  CASE command = 'P'
  106.   DO print.acg
  107.  CASE command = 'L'
  108.   STOR CHR(PEEK (063)) TO dr
  109.   SET INDEX TO &dr.:lastname
  110.   STOR # TO rec:number
  111.   @ 19,00
  112.   @ 20,00
  113.   @ 21,00
  114.   @ 22,00
  115.   @ 19,12 SAY 'Please enter Last Name' GET name
  116.   READ
  117.   CLEA GETS
  118.   STOR TRIM(name) TO name
  119.   STOR !(name) TO name
  120.   FIND &name
  121.   @ 19,00
  122. * if it isn't in the file
  123.   IF # = 0
  124.    @ 20,00
  125.    @ 20,12 SAY name+' is not in the file'
  126.    @ 22,12 SAY 'Press RETURN to Continue'
  127.    SET CONSOLE OFF
  128.    WAIT
  129.    SET CONSOLE ON
  130.    GO rec:number
  131.    @ 20,00
  132.    @ 22,00
  133.   ENDI #=0
  134.   @ 19,12 SAY prompt1
  135.   @ 20,12 SAY prompt2
  136.   @ 21,12 SAY prompt3
  137.  CASE command = 'Q'
  138.   STOR f  TO more
  139.  ENDC
  140. ENDD
  141. RELE ALL
  142. STOR CHR(PEEK (063)) TO dr
  143. SET INDEX TO &dr.:lastname
  144. STOR t TO first
  145.