home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug001.arc / PART10.IQS / PART10.INS
Text File  |  1979-12-31  |  14KB  |  392 lines

  1. .po0
  2.                                dBAS┼ I╔ PAR╘ 10
  3.  
  4.      Appendinτ record≤ t∩ ß databasσ usinτ dBasσ 2.│ appendinτ techniquσ i≤ ì
  5. actuall∙ morσ comple° thaε editinτ existinτ records¼ a≤ wσ shal∞ see« WitΦ ì
  6. dBasσ 2.┤ i⌠ i≤ particularl∙ easy╗ jus⌠ desigε ß screeε forma⌠ fielΣ anΣ theε ì
  7. writσ iε you≥ code.
  8.  
  9.      ¬ EDI╘ ┴ RECORD
  10.      SE╘ FORMA╘ T╧ EDIT
  11.      EDI╘ RECOR─ #
  12.  
  13.      Oµ coursσ i⌠ wil∞ onl∙ worδ iε dBasσ 2.┤ o≥ later¼ anΣ theε onl∙ iµ yo⌡ ì
  14. jus⌠ wan⌠ t∩ edi⌠ field≤ a≤ the∙ arσ entereΣ iε thσ database« However¼ quitσ ì
  15. ofteε yo⌡ wan⌠ t∩ maintaiε field≤ iε thσ databasσ iε ß forma⌠ whicΦ woulΣ ì
  16. bafflσ thσ enΣ user¼ o≥ woulΣ bσ inconvenien⌠ t∩ dea∞ with« Takσ date≤ fo≥ ì
  17. example.
  18.  
  19.           DAT┼ DISORDER
  20.      
  21.      Date≤ arσ particularl∙ inconvenien⌠ t∩ dea∞ with¼ especiall∙ iµ yo⌡ wan⌠ ì
  22. t∩ sor⌠ o≥ inde° oε them« Sortinτ assume≤ tha⌠ thσ mos⌠ significan⌠ character≤ ì
  23. iε ß valuσ arσ a⌠ thσ lef⌠ hanΣ end¼ anΣ tha⌠ decreasingl∙ significan⌠ ì
  24. character≤ liσ acros≤ t∩ thσ right« Iε Australia¼ wσ jus⌠ don'⌠ handlσ date≤ ì
  25. tha⌠ way╗ insteaΣ wσ pu⌠ theφ iε thσ forma⌠ dd/mm/yy/¼ s∩ thσ mos⌠ significan⌠ ì
  26. character≤ arσ thσ 7tΦ anΣ 8th¼ thσ next¼ thσ 4tΦ anΣ 5th¼ anΣ thσ character≤ ì
  27. oµ leas⌠ significancσ arσ thσ 1s⌠ anΣ 2nΣ witΦ thσ exceptancσ oµ thσ slashe≤ ì
  28. whicΦ havσ n∩ significancσ a⌠ all.
  29.  
  30.      Iε thσ U.S« thσ thσ situatioε i≤ similar¼ witΦ aε eveε les≤ logica∞ datσ ì
  31. format║ mm/dd/yy« Wh∙ can'⌠ wσ bσ morσ logica∞ likσ thσ Sweeds¼ wh∩ (╔ ì
  32. believe⌐ writσ date≤ iε thσ forma⌠ yy/mm/dd?
  33.  
  34.      Clearl∙ iµ wσ wan⌠ t∩ inde° o≥ sor⌠ oε dates¼ wσ mus⌠ reforma⌠ theφ ì
  35. beforσ writinτ theφ int∩ thσ database¼ s∩ the∙ arσ followinτ rule≤ oµ ì
  36. significancσ fo≥ sorting« Thi≤ caε bσ donσ b∙ forcinτ thσ use≥ t∩ ente≥ thσ ì
  37. datσ witΦ thσ digit≤ iε aε appropriatσ positioε usinτ thσ @..GET..PICTUR┼ ì
  38. statement« Thi≤ operate≤ ß bi⌠ likσ thσ BASI├ PRIN╘ USIN╟ statement¼ excep⌠ iε ì
  39. reverse« Iµ wσ sa∙ iε ou≥ code:
  40.  
  41.                └ 2,6░ GE╘ disdatσ USIN╟ '99/99/99'
  42.  
  43.      dBasσ wil∞ displa∙ tha⌠ fielΣ witΦ ß couplσ oµ slashe≤ alread∙ iε it¼ ì
  44. whicΦ thσ use≥ canno⌠ overtypσ o≥ move« Thu≤ thσ use≥ i≤ forceΣ t∩ inpu⌠ thσ ì
  45. datσ iε thσ righ⌠ format« ┴ datσ likσ 6/1/8┤ ha≤ t∩ bσ entereΣ a≤ :
  46.  
  47.                <space╛ ╢ <space╛ ▒ 84
  48.              or
  49.                ╢ <space╛ ▒ <space╛ 84
  50.  
  51. witΦ thσ firs⌠ forma⌠ beinτ thσ bes⌠ one«  Furthermore¼ thσ '9º character≤ iε ì
  52. thσ PICTUR┼ statemen⌠ indicatσ tha⌠ onl∙ numeriπ inpu⌠ wil∞ bσ accepted¼ s∩ ì
  53. thσ use≥ canno⌠ typσ '╢ Jaε 84'« Havinτ go⌠ ou≥ inpu⌠ witΦ thσ character≤ iε ì
  54. thσ righ⌠ places¼ wσ caε reforma⌠ i⌠ t∩ allo≈ indexing« Thσ neates⌠ wa∙ t∩ d∩ ì
  55. thi≤ i≤ witΦ ß simplσ one-liner:
  56. è         STOR┼ $(disdate,7,2)+$(disdate,4,2)+$(disdate,1,2⌐ T╧ mdate
  57.  
  58. whicΦ wil∞ turε thσ 'displa∙ formatº datσ iε disdatσ int∩ ß characte≥ strinτ ì
  59. iε thσ forma⌠ yymmdΣ iε mdate« Thi≤ use≤ thσ '$º substrinτ extractioε operato≥ ì
  60. t∩ picδ ou⌠ tw∩ character≤ a⌠ ß time¼ startinτ a⌠ positioε 7¼ ┤ anΣ ▒ ì
  61. respectivel∙ oµ thσ disdatσ string« Becausσ thi≤ i≤ ß bi⌠ tediou≤ t∩ typσ anΣ ì
  62. havinτ ß distinc⌠ possibilit∙ oµ havinτ typinτ errors¼ ╔ usuall∙ turε i⌠ int∩ ì
  63. ß macro:
  64.  
  65. STOR┼ 'STOR┼ $(disdate,7,2)+$(disdate,4,2)+$(disdate,1,2⌐ T╧ mdateº T╧ ì
  66. makedate
  67.  
  68. anΣ theε cal∞ i⌠ a≤ requireΣ iε programs:
  69.  
  70.                                   &makedate
  71.  
  72.      Oµ course¼ thi≤ approacΦ mean≤ thσ variablσ 'makedateº mus⌠ bσ carefull∙ ì
  73. preserveΣ thorougΦ al∞ thσ release≤ anΣ restore≤ iε thσ sui⌠ oµ programs¼ bu⌠ ì
  74. that'≤ no⌠ terribl∙ difficult.
  75.  
  76.      
  77.           A╙ YO╒ LIK┼ IT
  78.  
  79.      ┴ morσ difficul⌠ probleφ i≤ allowinτ thσ use≥ morσ freedoφ t∩ typσ iε thσ ì
  80. datσ exactl∙ a≤ he/shσ want≤ to« Wσ mus⌠ worδ ou⌠ froφ thσ positioε oµ thσ ì
  81. slashe≤ iε thσ date≤ whicΦ character≤ represen⌠ thσ years¼ month≤ anΣ days« ì
  82. Listinτ ▒ i≤ ß samplσ routinσ t∩ d∩ this« It'≤ inpu⌠ i≤ ß characte≥ string¼ ì
  83. mdate¼ anΣ it'≤ outpu⌠ i≤ threσ numeriπ variables║ day¼ montΦ anΣ year« Thi≤ ì
  84. caε theε bσ useΣ t∩ calculatσ ß Juliaε Calenda≥ number.
  85.  
  86.      It'≤ operatioε i≤ ß littlσ obtusσ iε parts¼ particularl∙ wherσ wσ adΣ thσ ì
  87. positioε oµ thσ firs⌠ slasΦ t∩ thσ positioε oµ thσ seconΣ slash« Thσ fo≥ thi≤ ì
  88. is¼ a⌠ tha⌠ poin⌠ iε thσ program¼ slash▓ contain≤ thσ positioε oµ thσ seconΣ ì
  89. slasΦ iε thσ substrinτ startinτ jus⌠ afte≥ thσ firs⌠ slash¼ wherea≤ wσ wan⌠ ì
  90. it≤ positioε iε thσ origina∞ string¼ iµ yo⌡ seσ wha⌠ ╔ mean« Iµ yo⌡ don't¼ tr∙ ì
  91. single-steppinτ thorougΦ thσ routinσ witΦ ECH╧ se⌠ O╬ anΣ TAL╦ se⌠ ON¼ anΣ al∞ ì
  92. shoulΣ (eventually⌐ becomσ clear.
  93.  
  94.           NAM┼  GAME
  95.  
  96.      ┴ simila≥ probleφ i≤ handlinτ names« Generall∙ wσ wan⌠ t∩ inde° ß ì
  97. databasσ containinτ name≤ anΣ addresse≤ oε thσ surnamσ field¼ bu⌠ tha⌠ ì
  98. generall∙ mean≤ tha⌠ wσ havσ t∩ desigε screen≤ witΦ separatσ surnamσ anΣ ì
  99. forenamσ fields¼ anΣ thσ use≥ ha≤ t∩ bσ awarσ oµ wh∙ thi≤ i≤ so« Wh∙ can'⌠ thσ ì
  100. machinσ d∩ thσ dirt∙ work┐  Iε othe≥ words¼ wh∙ can'⌠ thσ use≥ typσ iε ß namσ ì
  101. iε thσ forφ oµ "Mr« Johε Q« Publicó anΣ le⌠ thσ compute≥ worδ ou⌠ wha⌠ thσ ì
  102. variou≤ field≤ are?
  103.  
  104.      Thσ routinσ iε listinτ ▓ i≤ a≤ closσ a≤ I'vσ beeε ablσ t∩ ge⌠ t∩ doinτ ì
  105. this« I⌠ stil∞ impose≤ somσ forma⌠ restriction≤ oε thσ use≥ ie║ middlσ ì
  106. initial≤ mus⌠ alway≤ bσ followeΣ b∙ ß perioΣ (a≤ tha⌠ i≤ ho≈ thσ prograφ ì
  107. recognise≤ them)¼ anΣ thσ titlσ a⌠ thσ beginninτ mus⌠ bσ followeΣ b∙ ß spacσ ì
  108. o≥ ß period« Thσ techniquσ useΣ herσ i≤ t∩ examinσ thσ firs⌠ par⌠ oµ thσ ì
  109. string╗ and¼ a≤ wσ recognisσ wha⌠ i⌠ is¼ t∩ storσ i⌠ iε thσ databasσ usinτ ß ì
  110. REPLAC┼ command╗ anΣ "lo≡ i⌠ offó thσ fron⌠ enΣ oµ thσ inpu⌠ string¼ name.è     Noticσ thσ lis⌠ oµ title≤ anΣ honorific≤ tha⌠ caε easil∙ bσ extendeΣ t∩ ì
  111. takσ accoun⌠ oµ militar∙ rank≤ o≥ whatever╗ Listinτ ▓ i≤ jus⌠ aε example.
  112.  
  113.      Incorporatinτ thi≤ kinΣ oµ codσ int∩ ß V2.│ stylσ appenΣ o≥ edi⌠ i≤ ver∙ ì
  114. simple« Thσ pseud∩ codσ remain≤ identical¼ bu⌠ ß D╧ SURNAM┼ commanΣ (o≥ ì
  115. whateve≥ processinτ yo⌡ require⌐ i≤ inserteΣ in-linσ jus⌠ beforσ thσ memor∙ ì
  116. variable≤ arσ replaceΣ int∩ thσ database.
  117.  
  118.      Fo≥ example¼ takσ ß looδ a⌠ Listinτ 3¼ ß simplσ screeε inpu⌠ screeε whicΦ ì
  119. input≤ employeσ timesheet≤ fo≥ ß professiona∞ timσ accountinτ system« Thσ onl∙ ì
  120. bit≤ oµ processinτ are¼ first¼ ß datσ conversioε (%makedate)¼ anΣ theε tw∩ ì
  121. line≤ oµ timσ conversion:
  122.  
  123.      STOR┼ VAL($(trif:time,1,2))+VAL($(trif:time,4,2))/6░ T╧ triform
  124.      STOR┼ VAL($(tito:time,1,2))+VAL($(tito:time,4,2))/6░ T╧ tito
  125.      
  126.      It'≤ worthwhilσ takinτ somσ timσ t∩ understanΣ these¼ a≤ the∙ illustratσ ì
  127. ho≈ yo⌡ caε makσ ß characte≥ strinτ oµ thσ forφ 'hh.mmº anΣ conver⌠ i⌠ int∩ ß ì
  128. numeriπ figurσ fo≥ hour≤ anΣ ß decima∞ fractioε oµ aε hour« 
  129.  
  130.           VALI─ REASONS
  131.  
  132.      Tw∩ othe≥ technique≤ arσ importan⌠ here« First¼ thσ prograφ illustrate≤ ì
  133. validatioε agains⌠ anothe≥ database« It'≤ important¼ iε an∙ billinτ system¼ ì
  134. tha⌠ worδ i≤ onl∙ donσ fo≥ valiΣ joΓ number≤ anΣ clien⌠ number≤ - otherwisσ i⌠ ì
  135. can'⌠ bσ billed« Thi≤ kinΣ oµ contro∞ i≤ vita∞ t∩ thσ profitablσ operatioε oµ ì
  136. an∙ business¼ a≤ i⌠ eliminate≤ unprofitablσ work« Iε thσ secondar∙ databasσ ì
  137. area¼ wσ havσ openeΣ thσ job≤ database¼ whicΦ i≤ indexeΣ oε thσ concatenatioε ì
  138. oµ clien⌠ numbe≥ anΣ joΓ number« Oncσ thσ forφ ha≤ beeε filleΣ in¼ wσ se⌠ u≡ ß ì
  139. ke∙ valuσ froφ thosσ tw∩ fields¼ selec⌠ secondar∙ anΣ tr∙ t∩ FIN─ thσ ì
  140. appropriatσ record« Iµ wσ can'⌠ finΣ it¼ dBasσ wil∞ returε ß recorΣ numbe≥ oµ ì
  141. 0¼ anΣ s∩ wσ wil∞ kee≡ returninτ t∩ edi⌠ thosσ field≤ unti∞ ß valiΣ ì
  142. combinatioε oµ joΓ anΣ clien⌠ numbe≥ ha≤ beeε keyeΣ in.
  143.  
  144.      Thσ seconΣ importan⌠ techniquσ i≤ t∩ usσ thσ prefi° (ti-« meaninτ Timσ ì
  145. Input⌐ beforσ al∞ memor∙ variablσ name≤ t∩ indicatσ tha⌠ the∙ belonτ t∩ thi≤ ì
  146. module« A⌠ thσ end¼ thσ RELEAS┼ AL╠ LIK┼ ti¬ statemen⌠ release≤ onl∙ thosσ ì
  147. variable≤ knowε iε thi≤ mode∞ oµ code╗ an∙ other≤ arσ lef⌠ alone« Oµ course¼ ì
  148. somσ carσ mus⌠ bσ takeε witΦ name≤ wheε usinτ thi≤ technique« Fo≥ example¼ iµ ì
  149. iε ß modulσ calleΣ Maiε AdΣ wσ decidσ t∩ prefi° variablσ name≤ witΦ ma-« theε ì
  150. RELEAS┼ AL╠ LIK┼ ma¬ wil∞ als∩ releasσ ou≥ makedatσ macr∩ variable« Perhap≤ ì
  151. thσ bes⌠ solutioε i≤ t∩ prefi° al∞ globa∞ variable≤ likσ tha⌠ onσ witΦ ß g.
  152.  
  153.      Betweeε them¼ thesσ technique≤ illustratσ ho≈ strinτ handlinτ technique≤ ì
  154. caε bσ useΣ t∩ alte≥ thσ interna∞ storagσ oµ dates¼ time≤ anΣ names« Othe≥ ì
  155. type≤ oµ characte≥ variable≤ caε als∩ bσ handleΣ thi≤ way╗ it'≤ u≡ t∩ yo⌡ t∩ ì
  156. makσ usσ oµ it.
  157.  
  158.      Nex⌠ lessoε wσ looδ a⌠ programminτ stylσ generally¼ witΦ thσ emphasi≤ oε ì
  159. structureΣ programminτ techniques.
  160.  
  161.  
  162.                 FIGURE╙ 1¼ ▓ AN─ │ AR┼ O╬ TH┼ FOLLOWIN╟ PAGES.
  163.  
  164. è
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. ----------------------------------------------------------------------------- 
  179.      LISTIN╟ 1« Samplσ routinσ t∩ givσ thσ use≥ freedoφ t∩ typσ thσ datσ iε 
  180. an∙ desireΣ format.
  181. -----------------------------------------------------------------------------  
  182.  
  183.      ¬    DATE.CM─ datσ strippe≥ 4/8┤ b∙ Le≤ Bell.
  184.      ¬    Inpu⌠ variablσ mdatσ (C⌐ containinτ dd/mm/y∙ o≥ d/m/y∙ o≥ whatever
  185.      ¬    Outpu⌠ variablσ year¼ month¼ da∙ (N)
  186.  
  187.      storσ @('/',mdate⌐ t∩ slash1
  188.      storσ @('/',$(mdate,slash1+1)⌐ t∩ slash▓ 
  189.      iµ slash▓ ╜ 0
  190.           storσ val($(mdate,slash1+1)⌐ t∩ year
  191.           storσ val($(mdate,1,slash1-1)⌐ t∩ month
  192.           storσ ░ t∩ day
  193.      else
  194.           storσ slash▓ ½ slash▒ t∩ slash2
  195.           storσ val($(mdate,slash2+1))⌐ t∩ year
  196.           storσ val($(mdate,1,slash1+1,slash2-slash1-1)⌐ t∩ month
  197.           storσ val($(mdate,1,slash1-1)⌐ t∩ day
  198.      endif
  199. releasσ slash1,slash2
  200.  
  201. ¬ EN─ O╞ LISTIN╟ 1.
  202. ----------------------------------------------------------------------------- 
  203.  
  204.                             LISTIN╟ ▓ O╬ NEX╘ PAGE
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218. èLISTIN╟ 2« Namσ handlinτ routine.
  219. ----------------------------------------------------------------------------- 
  220.     ¬ SURNAME.CM─  V3.░ b∙ Le≤ Bel∞ 5/13/84
  221.     ¬ Pull≤ apar⌠ namσ iε thσ forφ 'Mr« Johε Q.A« Publicº int∩ separatσ fields
  222.     ¬ Inpu⌠ memor∙ variable║ namσ 
  223.     ¬ Outpu⌠ fields║ title¼ first¼ midinit¼ surname
  224.     ¬ Workinτ variables║ snd≡ ╜ do⌠ position¼ sns≡ ╜ spacσ position
  225.     ¬ EstablisΦ iµ therσ i≤ ß titlσ anΣ takσ carσ oµ it.
  226.     STOR┼ @(º ',mname⌐ T╧ snsp
  227.     STOR┼ @('.',mnane⌐ T╧ sndp
  228.     I╞ (snd≡ ╝ sns≡ .AND« snd≡ ú 0)
  229.            STOR┼ snd≡ ½ ▒ T╧ snsp
  230.     ENDIF
  231.     STORE$(mname,1,snsp-1⌐ T╧ snti
  232.     I╞ @(!(snti),'MRMRSMISSMSPROFREVDRMR.MRS.MISS.MS.PROF.REV.DR.'⌐ ╛ 0
  233.            ¬ I≤ i⌠ ß title
  234.            REPLAC┼ titlσ WIT╚ sntΘ NOUPDATE
  235.            ¬ Removσ titlσ froφ name
  236.            STOR┼ $(mname,snsp⌐ T╧ mname
  237.     ENDI╞  
  238.     ¬ Removσ leadinτ spaces
  239.     D╧ WHIL┼ $(mname,1,1⌐ ╜ º '
  240.            STOR┼ $(mname,2⌐ T╧ mname
  241.     ENDDO
  242.     STOR┼ TRIM(mname⌐ T╧ mname
  243.     I╞ @(º ',$(mname,1)⌐ ╛ 0
  244.            ¬ Therσ arσ tw∩ words
  245.            ¬ Checδ fo≥ firs⌠ name
  246.            STOR┼ @(º ',mname⌐ T╧ snsp
  247.            STOR┼ @('.',mname⌐ T╧ snd≡ 
  248.            ¬ I≤ firs⌠ namσ aε initial
  249.            I╞ (snd≡ ╝ sns≡ .AND« snd≡ ú 0)
  250.                 ¬ I⌠ is
  251.                 REPLAC┼ firs⌠ WIT╚ $(mname,1,sndp⌐ NOUPDATE
  252.                 STOR┼ $(mname,sndp+1⌐ T╧ mname
  253.            ELSE
  254.                 ¬ Firs⌠ worΣ i≤ firs⌠ name
  255.                 REPLAC┼ firs⌠ WIT╚ $(mname,1,snsp-1⌐ NOUPDATE
  256.                 STOR┼ $(mname,snsp+1⌐ T╧ mname
  257.            ENDIF
  258.            ¬ Removσ leadinτ spaces
  259.            D╧ WHIL┼ $(mname,1,1⌐ ╜ º '
  260.                 STOR┼ $(MNAME,2⌐ T╧ mname
  261.            ENDDO
  262.            ¬ Checδ fo≥ midinits
  263.            REPLAC┼ midini⌠ WIT╚ º º NOUPDATE
  264.            STOR┼ @('.',mname⌐ T╧ sndp
  265.            D╧ WHIL┼ snd≡ ╛ 0
  266.                 REPLAC┼ midini⌠ WIT╚ TRIM(midinit⌐ - $(mname,1,sndp⌐ NOUPDATE
  267.                 STOR┼ $(mname,sndp+1⌐ T╧ mname
  268.                 D╧ WHIL┼ $(mname,1,1⌐ ╜ º '
  269.                      STOR┼ $(mname,2⌐ T╧ mname
  270.                 ENDDO
  271.                 STOR┼ @('.',mname⌐ T╧ sndp
  272.            ENDD╧                                             cont...è    ENDI╞  
  273.     ¬ What'≤ lef⌠ mus⌠ bσ thσ surname
  274.     REPLAC┼ surnamσ WIT╚ mname
  275.     RELEAS┼ snsp,sndp,snti
  276.  
  277.     ¬ EN─ O╞ LISTIN╟ 2.
  278.  
  279. -----------------------------------------------------------------------------
  280.  
  281.  
  282.                         LISTIN╟ │ START╙ O╬ NEX╘ PAGE.
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326. èLISTIN╟ 3« Screeε inpu⌠ routinσ fo≥ employeσ timesheets.
  327. -----------------------------------------------------------------------------  
  328. ¬ TIME.CM─ 
  329. ¬ ente≥ time≤ froφ timesheets
  330. US┼ time≤ INDE╪ timid
  331. ¬ se⌠ u≡ validatioε fo≥ joΓ numbe≥ anΣ clien⌠ number
  332. SELEC╘ SECONDARY
  333. US┼ job≤ INDE╪ jobid
  334. SELEC╘ PRIMARY
  335. STOR┼ º   º T╧ tistaffno
  336. STOR┼ ⌠ T╧  timore
  337. D╧ WHIL┼ timore
  338.   STOR┼ º        º T╧ disdate
  339.   STOR┼ º      º T╧ tifr:time
  340.   STOR┼ º      º T╧ tito:time
  341.   STOR┼ º   º T╧ ticlientno
  342.   STOR┼ º      º T╧ tijobno
  343.   STOR┼ 000.0░ T╧ tirate
  344.   ERASE
  345.   └ 4,╕ SA┘ 'Stafµ ID'
  346.   └ 4,1╢ GE╘ tistaffn∩ PICTUR┼ '!!!'
  347.   └ 4,4░ SA┘ 'Date'
  348.   └ 4,4┤ GE╘ disdatσ PICTUR┼ '99/99/99'
  349.   └ 5,┤ SA┘ 'Star⌠ Time'
  350.   └ 5,1╢ GE╘ tifr:timσ PICTUR┼ '99.99'
  351.   └ 5,2╡ SA┘ 'FinisΦ Time'
  352.   └ 5,3╢ GE╘ tito:timσ PICTUR┼ '99.99'
  353.   └ 7,┤ SA┘ 'Clien⌠ No.'
  354.   └ 7,1╢ GE╘ ticlientn∩ PIC╘ '999'
  355.   └ 7,2╡ SA┘ 'JoΓ Number'
  356.   └ 7,3╢ GE╘ tijobn∩ PICTUR┼ '999999'
  357.   └ 9,┤ SA┘ 'Rate'
  358.   └ 9,1╢ GE╘ tirate
  359.   READ
  360.   I╞ tifr:timσ ╜ º '
  361.      STOR┼ µ T╧ timore
  362.   ELSE
  363.      ¬ Validatσ clientn∩ anΣ jobno
  364.      STOR┼ ticlientno+tijobn∩ T╧ tival
  365.      SEL┼ SECO
  366.      ¬ job≤ databasσ i≤ indexeΣ oε clientno+jobno
  367.      FIN─ &tival
  368.      D╧ WHIL┼ ú ╜ 0
  369.      └ 22,▓ SAY'InvaliΣ joΓ numbe≥ o≥ clien⌠ number« Pleasσ rσ enter'+CHR(7)
  370.      └ 7,1╖ GE╘ ticlientn∩ PICTUR┼ '999'
  371.      └ 7,3╢ GE╘ tijobn∩ PICTUR┼ '999999'
  372.      READ
  373.      STOR┼ ticlientno+tijobn∩ T╧ tival
  374.      FIN─ &tival
  375.   ENDDO
  376.   SEL┼ PRIMARY
  377.   APPEN─ BLANK
  378.   &makedate
  379.   STOR┼ VAL($(tifr:time,1,2))+VAL($(tifr:time,4,2))/6░ T╧ tiform
  380.   STOR┼ VAL($(tito:time,1,2))+VAL($(tito:time,4,2))/6░ T╧ titoè  REPLAC┼ staffn∩ WIT╚ tistaffno¼ datσ WIT╚ mdate
  381.   REPLAC┼ from:timσ WIT╚ tiform¼ to:timσ WIT╚ tito
  382.   REPLAC┼ clientn∩ WIT╚ ticlientno¼ jobn∩ WIT╚ tijobno¼ ratσ WIT╚ tirate
  383.   ENDIF
  384. ENDDO
  385. RELEAS┼ AL╠ LIK┼ ti*
  386.  
  387. ¬ EN─ O╞ LISTIN╟ 3.
  388.  
  389.  
  390.  
  391.                               EN─  O╞  PAR╘  10.
  392.