home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / DATABASE / KPHANDYP.LBR / FONEBOOK.CZD / FONEBOOK.CMD
OS/2 REXX Batch file  |  2000-06-30  |  4KB  |  159 lines

  1. STOR T to fonebook
  2. @ 18,0
  3. @ 16,0
  4. @ 3,52 say chr(27)+chr(66)+chr(50)
  5. SET intensity off
  6. @ 3,52 say 'PHONE BOOK SUBSYSTEM'
  7. @ 3,71 say chr(27)+chr(67)+chr(50)
  8. SET intensity on
  9. @ 5,48 say 'A - Family telephone number list'
  10. @ 6,48 say 'B - Acquaintances telephone list'
  11. @ 7,48 say 'C - Office/co-workers phone list'
  12. @ 8,48 say 'D - Business firm telephone list'
  13. @ 9,48 say 'E - Shop/services telephone list'
  14. @ 10,48 say 'F - Emergency phone numbers list'
  15. @ 11,48 say 'G - Other telephone numbers list'
  16. @ 14,48 say 'R - Exit to the main system menu'
  17. SET intensity off
  18. @ 16,52 say "Option (0-9; A-G or R)? "
  19. SET console off
  20. WAIT to option
  21. SET console on
  22. IF val(option)>0 .or. option='0'
  23. DO changeop
  24. RETU
  25. ENDI
  26. IF !(option)='R'
  27. RETU
  28. ELSE
  29. USE fonebook index fonebook
  30. STOR ' ' to action
  31. STOR !(option) to option
  32. DO WHIL fonebook
  33. IF !(action)#'P'
  34. ERAS
  35. SET intensity on
  36. @ 1,0 say 'ADDRESS & PHONE BOOK for'
  37. DO CASE
  38. CASE  option='A'
  39. @ 1,25 say 'FAMILY'
  40. CASE option='B'
  41. @ 1,25 say 'ACQUAINTANCES'
  42. CASE option='C'
  43. @ 1,25 say 'OFFICE/CO-WORKERS'
  44. CASE option='D'
  45. @ 1,25 say 'BUSINESS FIRMS'
  46. CASE option='E'
  47. @ 1,25 say 'SHOPS & SERVICES'
  48. CASE option='F'
  49. @ 1,25 say 'EMERGENCIES'
  50. otherwise
  51. @ 1,25 say 'OTHER CATEGORIES'
  52. ENDC
  53. @ 17,0 say '--------------------------------------------------------------------------------'
  54. SET intensity off
  55. @ 18,0 say 'Enter one of the following single letter commands:'
  56. SET intensity on
  57. @ 19,0 say 'A)dd   E)dit   P)age   Q)uit   R)estart   S)elect'
  58. FIND &option
  59. STOR 3 to line
  60. STOR 0 to col
  61. IF !(action)#'P'
  62. DO WHIL line*col<630 .and. disptype=option .and. .not. eof
  63. SET intensity off
  64. @ line,col say # using '###'
  65. IF !(disptype)='D' .or. !(disptype)='E'
  66. @ line,col+5 say firm
  67. ELSE
  68. @ line,col+5 say name
  69. ENDI
  70. STOR trim(phone) to fone
  71. @ line,col+(38-len(fone)) say fone
  72. STOR line+1 to line
  73. IF line>=15 .and. col=0
  74. STOR 3 to line
  75. STOR 42 to col
  76. ENDI
  77. SKIP
  78. ENDD
  79. ENDI
  80. ENDI
  81. STOR ' ' to action
  82. @ 20,0 say ' '
  83. WAIT to action
  84. DO CASE
  85. CASE !(action)='A'
  86. GOTO bottom
  87. APPE BLAN
  88. REPL disptype with option
  89. EDIT #
  90. CASE !(action)='E'
  91. GOTO top
  92. FIND &option
  93. BROW
  94. CASE !(action)='P'
  95. STOR 3 to line
  96. DO WHIL line<=15
  97. @ line,0
  98. STOR line+1 to line
  99. ENDD
  100. STOR 3 to line
  101. STOR 0 to col
  102. DO WHIL .not. eof .and. disptype=option .and. line*col<630
  103. @ line,col say # using '###'
  104. IF !(disptype)='D' .or. !(disptype)='E'
  105. @ line,col+5 say firm
  106. ELSE
  107. @ line,col+5 say name
  108. ENDI
  109. STOR trim(phone) to fone
  110. @ line,col+(38-len(fone)) say fone
  111. STOR line+1 to line
  112. IF line>=15 .and. col=0
  113. STOR 3 to line
  114. STOR 42 to col
  115. ENDI
  116. SKIP
  117. ENDD
  118. CASE !(action)='Q'
  119. STOR F to fonebook
  120. CASE !(action)='R'
  121. GOTO top
  122. CASE !(action)='S'
  123. @ 21,0
  124. @ 20,0 say ' '
  125. ACCE 'Enter number adjacent to your selection and press RETURN' to sel
  126. STOR val(sel) to num
  127. GOTO num
  128. ERAS
  129. @ 1,1 say name
  130. IF spouse#' '
  131. @ 1,1+(2+len(trim(name))) say '('+trim(spouse)+')'
  132. ENDI
  133. @ 1,1+(6+len(trim(name))+len(trim(spouse))) say relation
  134. @ 1,1+(8+len(trim(name))+len(trim(spouse))+len(trim(relation))) say birthdate
  135. @ 2,1 say firm
  136. IF category#' '
  137. @ 2,1+(2+len(trim(firm))) say '('+trim(category)+')'
  138. ENDI
  139. @ 4,1 say street
  140. @ 5,1 say trim(city)+','
  141. @ 5,1+(2+len(trim(city))) say trim(state)
  142. @ 5,1+(4+len(trim(city))+len(trim(state))) say zip
  143. @ 7,1 say 'phone number: '+phone
  144. @ 8,1 say 'mailing list: '+cardlist
  145. @ 9,1 say 'display type: '+disptype
  146. @ 11,1 say 'Edit (Y/N)? '
  147. SET console off
  148. WAIT to ed
  149. SET console on
  150. IF !(ed)='Y'
  151. EDIT #
  152. PACK
  153. ENDI
  154. ENDC
  155. ENDD
  156. USE
  157. ENDI
  158. RETU
  159.