home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / 007d / cobol85.txt < prev    next >
Text File  |  1988-06-20  |  23KB  |  658 lines

  1. .op
  2.  
  3.  
  4.  
  5.  
  6.  
  7. .he             COBOL 85 - The new standard                    Page  #
  8.  
  9.      Thσ Commoε Busines≤ OrienteΣ Language¼ COBOL¼ wil∞ celebratσ ì
  10. ì
  11. it≤ 30tΦ anniversar∙ iε Apri∞ oµ nex⌠ year«  Thσ ne≈ standarΣ ì
  12. ì
  13. fo≥ COBO╠ compilers¼ hereafte≥ calleΣ COBO╠ 85¼ wa≤ announceΣ iε ì
  14. ì
  15. Septembe≥ oµ 198╡ afte≥ seveε year≤ oµ deliberation«  Thi≤ ne≈ ì
  16. ì
  17. versioε oµ thσ world'≤ mos⌠ popula≥ languagσ present≤ man∙ ne≈ ì
  18. ì
  19. improvement≤ whicΦ wil∞ servσ t∩ furthe≥ promotσ thσ efficienc∙ ì
  20. ì
  21. oµ COBOL'≤ datß processinτ capabilities«  However¼ nothinτ caε bσ ì
  22. ì
  23. gaineΣ withou⌠ sacrifice«  B∙ improvinτ thσ programminτ ì
  24. ì
  25. efficienc∙ thi≤ ne≈ standarΣ haΣ t∩ givσ u≡ completσ upwarΣ ì
  26. ì
  27. compatibility« ì
  28.  
  29.  
  30.      Iε 1959¼ mos⌠ programminτ task≤ werσ writteε iε machinσ ì
  31. ì
  32. codes«  Thi≤ proveΣ t∩ bσ ver∙ timσ consuminτ anΣ costly╗ als∩ ì
  33. ì
  34. fe≈ peoplσ coulΣ understanΣ i⌠ enougΦ t∩ bσ productive«  Wheε thσ ì
  35. ì
  36. assembler≤ camσ out¼ i⌠ markeΣ thσ beginninτ oµ highl∙ productivσ ì
  37. ì
  38. programming«  However¼ therσ stil∞ existeΣ anothe≥ majo≥ problem║ ì
  39. ì
  40. aε assembl∙ languagσ prograφ i≤ machinσ specific«  Programmer≤ ì
  41. ì
  42. haΣ t∩ learε almos⌠ completel∙ differen⌠ language≤ t∩ worδ witΦ ì
  43. ì
  44. differen⌠ computers«  Fo≥ thi≤ purpose¼ anΣ ß couplσ oµ othe≥ ì
  45. ì
  46. reasons¼ ß conferencσ wa≤ organized«  Thσ goa∞ oµ thi≤ ì
  47. ì
  48. conference¼ helΣ oε thσ campu≤ oµ thσ Universit∙ oµ Pennsylvania¼ ì
  49. ì
  50. wa≤ t∩ recommenΣ t∩ thσ Departmen⌠ oµ Defensσ t∩ havσ ß serie≤ oµ ì
  51. ì
  52. meeting≤ t∩ comσ u≡ witΦ a¼ "commoε busines≤ language.ó ì
  53.  
  54.  
  55.      Thσ followinτ year¼ thσ Conferencσ oε Datß System≤ ì
  56. ì
  57. Languages¼ CODASYL¼ wa≤ held«  Thσ resul⌠ wa≤ COBO╠ 60¼ thσ firs⌠ ìèì
  58. publisheΣ standarΣ oµ COBOL«  Thσ goa∞ wa≤ t∩ creatσ ß standarΣ ì
  59. ì
  60. fo≥ COBO╠ compiler≤ tha⌠ woulΣ satisf∙ threσ maiε problems«  Thσ ì
  61. ì
  62. firs⌠ wa≤ thσ probleφ oµ complicateΣ programming«  COBO╠ provideΣ ì
  63. ì
  64. easσ oµ programming¼ readability¼ anΣ understandinτ t∩ peoplσ iε ì
  65. ì
  66. thσ compute≥ fielΣ b∙ usinτ opeε endeΣ EnglisΦ-typσ statements«  ì
  67. ì
  68. Thσ seconΣ probleφ wa≤ tha⌠ oµ upwarΣ compatibility«  Iε othe≥ ì
  69. ì
  70. words¼ thσ COBO╠ languagσ provideΣ fo≥ eas∙ modifications¼ anΣ ì
  71. ì
  72. program≤ writteε fo≥ aε earlie≥ compile≥ woulΣ bσ ablσ t∩ bσ ì
  73. ì
  74. compileΣ oε thσ ne≈ compiler«  Thσ thirΣ anΣ fina∞ probleφ t∩ bσ ì
  75. ì
  76. solveΣ wa≤ transferability«  B∙ publishinτ ß COBO╠ standard¼ thσ ì
  77. ì
  78. author≤ wanteΣ t∩ bσ ablσ t∩ takσ ß prograφ compileΣ oε onσ branΣ ì
  79. ì
  80. oµ compute≥ anΣ bσ ablσ t∩ compilσ anΣ executσ thσ samσ sourcσ ì
  81. ì
  82. codσ oε ß differen⌠ computer«  Thus¼ COBO╠ wa≤ officiall∙ born« ì
  83.  
  84.  
  85.      Thσ UniteΣ State≤ oµ Americß Standard≤ Institute¼ USASI¼ ì
  86. ì
  87. whicΦ becamσ ANSI¼ mergeΣ witΦ CODASY╠ t∩ comσ u≡ witΦ COBO╠ 68«  ì
  88. ì
  89. Sincσ theε thσ tw∩ group≤ havσ publisheΣ COBO╠ 7┤ anΣ COBO╠ 85«  ì
  90. ì
  91. Thσ Internationa∞ Standard≤ Organization¼ ISO¼ ha≤ accepteΣ AN╙ ì
  92. ì
  93. COBO╠ version≤ a≤ internationa∞ standards« ì
  94.  
  95.  
  96.      Thσ rapiΣ acceptancσ anΣ continueΣ growtΦ iε thσ usσ oµ ì
  97. ì
  98. COBO╠ haΣ its root≤ iε ß changinτ programminτ environment«  A⌠ ì
  99. ì
  100. thσ timσ oµ thσ introductioε oµ COBOL¼ CP╒ timσ wa≤ relativel∙ ì
  101. ì
  102. expensive¼ morσs∩ thaε programme≥ time«  A≤ ß resul⌠ oµ this¼ ì
  103. ì
  104. programmer≤ madσ painstakinτ effort≤ t∩ makσ thei≥ program≤ morσ ì
  105. ì
  106. efficient¼ witΦ littlσ concerε fo≥ thσ timσ i⌠ tooδ t∩ accomplisΦ ì
  107. ì
  108. thσ codinτ task«  Sincσ tha⌠ time¼ thσ role≤ havσ switched«  Now¼ ì
  109. ì
  110. CP╒ timσ i≤ considereΣ cheap¼ anΣ prograφ efficienc∙ ha≤ giveε ì
  111. ìèwa∙ t∩ bette≥ documentatioε anΣ easσ oµ modification«  COBO╠ ì
  112. ì
  113. standard≤ havσ continuall∙ adjusteΣ t∩ thi≤ changσ witΦ morσ ì
  114. ì
  115. descriptivσ reserveΣ word≤ anΣ easie≥ t∩ incorporatσ modularity« ì
  116.  
  117.      Thσ difference≤ betweeε COBO╠ 8╡ anΣ COBO╠ 74¼ thσ curren⌠ ì
  118. ì
  119. accepteΣ standard¼ arσ to∩ broaΣ fo≥ completσ coverage«  Thi≤ ne≈ ì
  120. ì
  121. versioε bring≤ witΦ i⌠ ne≈ features¼ change≤ iε olΣ features¼ anΣ ì
  122. ì
  123. deletioε oµ obsoletσ features«  Thσ scopσ oµ thi≤ pape≥ cover≤ ì
  124. ì
  125. onl∙ thσ majo≥ difference≤ tha⌠ wil∞ makσ programminτ iε COBO╠ ì
  126. ì
  127. morσ efficien⌠ anΣ productive«  Thσ topic≤ covereΣ b∙ thi≤ pape≥ ì
  128. ì
  129. cu⌠ acros≤ two circle≤ oµ interest╗ bette≥ readabilit∙ oµ ì
  130. ì
  131. sourcσ code¼ anΣ easie≥ implementatioε oµ structureΣ logic.ì
  132. ì
  133. ì
  134.      Simplσ thing≤ tha⌠ makσ readinτ ß COBO╠ prograφ ß littlσ ì
  135. ì
  136. easie≥ makσ u≡ onσ advantagσ thi≤ standarΣ ha≤ t∩ offer«  WitΦ ì
  137. ì
  138. thσ fort∙-ninσ ne≈ reserveΣ words¼ tw∩ oµ theφ servσ onl∙ t∩ ì
  139. ì
  140. improvσ sourcσ codσ readability«  Wheε programminτ unde≥ COBO╠ 7┤ ì
  141. ì
  142. anΣ describinτ datß item≤ a≤ packeΣ decima∞ o≥ binary¼ thσ USAG┼ ì
  143. ì
  144. clausσ mus⌠ bσ useΣ witΦ COMPUTATIONA╠ o≥ COMPUTATIONA╠-3«  ì
  145. ì
  146. However¼ witΦ COBO╠ 8╡ therσ arσ bette≥ way≤ t∩ sho≈ thσ morσ ì
  147. ì
  148. efficien⌠ usσ oµ ß datß item«  Thσ ne≈ reserveΣ word≤ arσ    ì
  149. ì
  150. PACKE─-DECIMA╠ anΣ BINARY«  Now¼ datß item≤ caε bσ declareΣ a≤ ì
  151. ì
  152. follows║ ì
  153.  
  154. ì
  155.        0▒  FIELDS.ì
  156.  
  157.            0▓  DISPLA┘-ITE═     PI├ S9(5⌐ USAG┼ I╙ DISPLAY.ì
  158.  
  159.            0▓  PACKE─-ITE═      PI├ S9(5⌐ USAG┼ I╙ PACKE─-DECIMAL.ì
  160.  
  161.            0▓  BINAR┘-ITEM      PI├ S9(5⌐ USAG┼ I╙ BINARY.ì
  162.  
  163.      ì
  164.      However¼ eveε thougΦ writinτ ou⌠ BINAR┘ o≥ PACKE─-DECIMA╠ ì
  165. ìècreate≤ bette≥ readabilit∙ fo≥ debugging¼ thσ ne≈ compiler≤ wil∞ ì
  166. ì
  167. stil∞ accep⌠ COM╨ anΣ COM╨-3«  Eventuall∙ thσ latte≥ tw∩ reserveΣ ì
  168. ì
  169. word≤ wil∞ bσ eliminateΣ froφ thσ publisheΣ COBO╠ standard«     ì
  170. ì
  171. ì
  172.      Anothe≥ ne≈ advantagσ i≤ thσ numbe≥ oµ level≤ ß tablσ caε ì
  173. ì
  174. have«  Pas⌠ COBO╠ standard≤ havσ haΣ ß limi⌠ oµ threσ level≤ oµ ì
  175. ì
  176. subscripting¼ whilσ COBO╠ 8╡ ha≤ thσ capacit∙ fo≥ aε additiona∞ ì
  177. ì
  178. fou≥ levels«  ┴ tablσ ma∙ bσ describeΣ a≤ follows║ ì
  179.  
  180. ì
  181. 0▒  NEW-TABLE-TYPE.ì
  182.  
  183.     0▓  LEVEL-1                              OCCUR╙ ╡ TIMES.ì
  184.  
  185.         0│  LEVEL-2                          OCCUR╙ ╡ TIMES.ì
  186.  
  187.             0┤  LEVEL-3                           OCCUR╙ ╡ TIMES.ì
  188.  
  189.                 0╡  LEVEL-4                       OCCUR╙ ╡ TIMES.                    ì
  190.  
  191.                     0╢  LEVEL-╡                   OCCUR╙ ╡ TIMES.ì
  192.  
  193.                         0╖  LEVEL-╢               OCCUR╙ ╡ TIMES.ì
  194.  
  195.                             0╕  LEVEL-╖           OCCUR╙ ╡ TIMES.ì
  196.  
  197.                                 0╣  DATA-ITE═     PI├ 9(5).ì
  198.  
  199. ì
  200.  
  201.      Wheε ß prograφ i≤ designeΣ t∩ producσ ß repor⌠ tha⌠ wil∞ bσ ì
  202. ì
  203. seeε b∙ uppe≥ leve∞ management¼ whicΦ ma∙ bσ easil∙ impresseΣ b∙ ì
  204. ì
  205. smal∞ details¼ littlσ thing≤ sucΦ a≤ thσ datσ becomσ important«  ì
  206. ì
  207. WitΦ COBO╠ 7┤ thσ compile≥ caε returε thσ datσ, anΣ witΦ somσ ì
  208. ì
  209. mino≥ codinτ thσ datσ caε bσ writteε iε ß a forφ managemen⌠ ì
  210. ì
  211. wil∞ like«  Unde≥ COBO╠ 74¼ thσ datσ caε bσ obtaineΣ b∙ wa∙ oµ ì
  212. ì
  213. thσ MOV┼ statemen⌠ anΣ coulΣ bσ printeΣ iε thσ forφ 09/15/88«  Iµ ì
  214. ì
  215. ß montΦ tablσ i≤ included¼ thσ datσ coulΣ bσ pu⌠ iε thσ forφ oµ ì
  216. ì
  217. Septembe≥ 15¼ 1988«  Thi≤ forφ look≤ gooΣ t∩ management¼ bu⌠ ì
  218. ì
  219. COBO╠ 8╡ add≤ ß ne≈ leve∞ t∩ thσ aesthetic≤ oµ thσ date¼ thσ DA┘-ìèì
  220. O╞-WEE╦ reserveΣ word«  Wheε DA┘-O╞-WEE╦ i≤ useΣ witΦ thσ ACCEP╘ ì
  221. ì
  222. statement¼ thσ compile≥ return≤ ß onσ digi⌠ characte≥ tha⌠ stand≤ ì
  223. ì
  224. for║ ì
  225.  
  226.  
  227.                          ▒ ¡ Monday
  228.                          ▓ ¡ Tuesday
  229.                          │ ¡ Wednesday
  230.                          ┤ ¡ Thursday
  231.                          ╡ ¡ Friday
  232.                          ╢ ¡ Saturday
  233.                          ╖ ¡ Sunday
  234.  
  235. Thi≤ digi⌠ coulΣ bσ useΣ a≤ ß subscrip⌠ t∩ acces≤ ß da∙ table« ì
  236. ì
  237.  
  238.  
  239.      WORKING-STORAG┼ SECTION.
  240.  
  241.      0▒  DAYS-TABLE
  242.  
  243.          02  DAYS-DEFINED.
  244.  
  245.              03  PI├ X(9⌐         VALU┼ I╙ "MONDA┘   ".
  246.              03  PI├ X(9)         VALU┼ I╙ "TUESDA┘  ".
  247.              03  PI├ X(9)         VALU┼ I╙ "WEDNESDAY".
  248.              03  PI├ X(9⌐         VALU┼ I╙ "THURSDA┘ ".
  249.              03  PI├ X(9⌐         VALU┼ I╙ "FRIDA┘   ".
  250.              03  PI├ X(9⌐         VALU┼ I╙ "SATURDA┘ ".
  251.              03  PI├ X(9⌐         VALU┼ I╙ "SUNDA┘   ".
  252.  
  253.          0▓  DAY-NAM┼-TABLE REDEFINE╙ DAYS-DEFINED.
  254.  
  255.              0│  DAY-NAM┼         PI├ X(9⌐ OCCUR╙ ╖ TIMES.
  256.  
  257.      77  DAY-CODE.
  258.      .
  259.      .
  260.              ACCEP╘ DAY-COD┼ FRO═ DAY-OF-WEEK.
  261.  
  262.              DISPLA┘ "GOO─ MORNING¼ TODA┘ I╙ " DA┘-NAME(DA┘-CODE).ì
  263. ì
  264.  
  265.  
  266.      Aε experienceΣ COBO╠ 7┤ programme≥ woulΣ immediatel∙ noticσ ì
  267. ì
  268. thσ absencσ oµ thσ FILLE╥ reserveΣ word«  Anothe≥ onσ oµ COBO╠ ì
  269. ì
  270. 85'≤ improvement≤ ove≥ COBO╠ 7┤ i≤ it≤ morσ versatilσ usσ oµ thσ ì
  271. ì
  272. FILLE╥ ke∙ word«  Iε previou≤ version≤ FILLE╥ coulΣ no⌠ bσ useΣ ì
  273. ìèa⌠ thσ grou≡ level«  Als∩ includeΣ iε FILLER'≤ ne≈ rolσ i≤ ì
  274. ì
  275. optionability«  FILLE╥ i≤ aε optiona∞ word¼ anΣ iµ i⌠ i≤ omitteΣ ì
  276. ì
  277. thσ compile≥ assume≤ it≤ presence«  Comparσ thσ followinτ ì
  278. ì
  279. examples« ì
  280.  
  281. ì
  282.  
  283. COBO╠ 7┤ :                          COBO╠ 8╡ :ì
  284.  
  285. 0▒  HEADER-LINE                     0▒  HEADER-LINE.ì
  286.  
  287.     0▓  FILLE╥      PI├ XXXX.           0▓  FILLER.ì
  288.  
  289.     0▓  FILLE╥      PI├ XXXX«               0│           PI├ XXXX.ì
  290.  
  291.     0▓  TOTALS      PI├ 9999.               0│           PI├ XXXX.ì
  292.  
  293.     0▓  FILLE╥      PI├ XXXX«               0│  TOTAL╙   PI├ 9999.ì
  294.  
  295.                                             0│           PI├ XXXX.ì
  296.  
  297. ì
  298.  
  299.      Thi≤ ne≈ featurσ add≤ bette≥ readabilit∙ fo≥ thσ programmer≤, ì
  300. ì
  301. anΣ i⌠ eliminate≤ thσ neeΣ t∩ typσ FILLE╥ ove≥ anΣ ove≥ agaiε fo≥ ì
  302. ì
  303. ß prograφ witΦ man∙ header≤ anΣ detai∞ lines«  Sincσ thσ worΣ ì
  304. ì
  305. FILLE╥ wil∞ bσ absen⌠ froφ thσ fielΣ definitioε, thσ referenceablσ ì
  306. ì
  307. element≤ wil∞ bσ easie≥ t∩ recognize«  ì
  308.  
  309. ì
  310.      A≤ ever∙ programme≥ knows¼ wheε dealinτ witΦ ß prograφ tha⌠ ì
  311. ì
  312. make≤ usσ oµ table≤ oµ accumulators¼ i⌠ i≤ necessar∙ t∩ usσ aε ì
  313. ì
  314. ou⌠-oµ-flo≈ loo≡ jus⌠ t∩ initializσ thσ field≤ t∩ zero«  COBO╠ 8╡ ì
  315. ì
  316. ha≤ manageΣ t∩ overcomσ thi≤ inconvenience«  WitΦ thi≤ ne≈ ì
  317. ì
  318. standard¼ thσ VALU┼ clausσ caε bσ placeΣ oε element≤ unde≥ aε ì
  319. ì
  320. OCCUR╙ clause«  Thi≤ provide≤ ß simplσ methoΣ t∩ initializσ ß ì
  321. ì
  322. tablσ oµ value≤ t∩ an∙ numbe≥, a≤ showε here║ ì
  323.  
  324. ì
  325. .paè     0▒.ì
  326.  
  327.         0▓  EMPLOYEE-WAGE-TOTALS             OCCUR╙ 10░ TIMES.ì
  328.  
  329.             0│  EMPLOYEE-WAGES-TO-DATE       PI├ S9(8)V99ì
  330.  
  331.                                              VALU┼ I╙ 0.ì
  332.  
  333. ì
  334.  
  335. ì
  336.      Thσ feature≤ describeΣ s∩ fa≥ havσ al∞ resideΣ withiε thσ ì
  337. ì
  338. circlσ oµ bette≥ readability«  Thesσ smal∞ change≤ wil∞ makσ ì
  339. ì
  340. prograφ maintenancσ aε easie≥ task¼ anΣ iε thσ lonτ run¼ thi≤ ì
  341. ì
  342. wil∞ savσ valuablσ programminτ time«  Therσ i≤ stil∞ anothe≥ areß ì
  343. ì
  344. t∩ cover: bette≥ implementatioε oµ structureΣ logic«  COBO╠ 8╡ ì
  345. ì
  346. bring≤ witΦ i⌠ tw∩ ne≈ powerfu∞ feature≤ neve≥ beforσ offereΣ b∙ ì
  347. ì
  348. COBOL«  Thesσ feature≤ arσ nesteΣ program≤ anΣ instreaφ loops« ì
  349.  
  350. ì
  351.      Thσ firs⌠ feature¼ nesteΣ programs¼ i≤ ver∙ eas∙ t∩ ì
  352. ì
  353. implemen⌠ anΣ provide≤ ß wonderfu∞ wa∙ t∩ usσ differen⌠ module≤ ì
  354. ì
  355. createΣ b∙ member≤ oµ ß programminτ team«  Thσ forma⌠ i≤ ì
  356. ì
  357. conceptually¼ anΣ actually¼ rathe≥ simple«  Thσ ideß oµ nestedì
  358. ì
  359. program≤ i≤ illustrateΣ here║ ì
  360. ì
  361.  
  362.  
  363.    ┌───────────────────────────────────────────────────────┐ì
  364.    ¢│                     Maiε Prograφ                      │
  365.    ¢│   ┌───────────────────────────────────────────────¢┐   │
  366.    ¢│   ¢│                Inne≥ Prograφ ╔                ¢│   │ì
  367.    ¢│   ¢│   ┌──────────────────────────────────────¢┐    ¢│   │ì
  368.    ¢│   ¢│   ¢│            Inne≥ Prograφ Iß          ¢│    ¢│   │
  369.    ¢│   ¢│   └──────────────────────────────────────¢┘    ¢│   │ì
  370.    ¢│   ¢│   ┌──────────────────────────────────────¢┐    ¢│   │ì
  371.    ¢│   ¢│   ¢│            Inne≥ Prograφ IΓ          ¢│    ¢│   │ì
  372.    ¢│   ¢│   └──────────────────────────────────────¢┘    ¢│   │
  373.    ¢│   └───────────────────────────────────────────────¢┘   │
  374.    ¢│   ┌───────────────────────────────────────────────¢┐   │ì
  375.    ¢│   ¢│                Inne≥ Prograφ I╔               ¢│   │
  376.    ¢│   └───────────────────────────────────────────────¢┘   │ì
  377.    └───────────────────────────────────────────────────────┘
  378. ì
  379. è     Thi≤ conceptua∞ figurσ caε easil∙ bσ transformeΣ int∩ ß ì
  380. ì
  381. COBO╠ skeletoε a≤ follows:ì
  382.                                              
  383.  
  384.      IDENTIFICATIO╬ DIVISION.      ───────────────┐ì
  385.      PROGRA═ ID« MAI╬-PROGRAM.                    │ì
  386.                                                   │
  387.           .                                       │ì
  388.           .                                       │
  389.           .                                       │ì
  390.                                                   │
  391.      IDENTIFICATIO╬ DIVISION.      ──────────┐    │ì
  392.      PROGRA═ ID« INNE╥-PROGRAM-I.            │    │ì
  393.                                              │    │
  394.           .                                  │    │ì
  395.           .                                  │    │
  396.           .                                  │    │ì
  397.                                              │    │
  398.      IDENTIFICATIO╬ DIVISION«      ─────┐    │    │ì
  399.      PROGRA═ ID« INNER-PROGRAM-IA«      │    │    │ì
  400.                                         │    │    │
  401.           «                             │    │    │ì
  402.           «                             │    │    │
  403.           «                             │    │    │ì
  404.                                         │    │    │
  405.      EN─ PROGRA═ INNER-PROGRAM-IA« ─────┘    │    │ì
  406.                                              │    │ì
  407.                                              │    │
  408.      IDENTIFICATIO╬ DIVISION«      ─────┐    │    │ì
  409.      PROGRA═ ID« INNER-PROGRAM-IB«      │    │    │ì
  410.                                         │    │    │
  411.           «                             │    │    │ì
  412.           «                             │    │    │
  413.           «                             │    │    │ì
  414.                                         │    │    │
  415.      EN─ PROGRA═ INNER-PROGRAM-IB« ─────┘    │    │ì
  416.                                              │    │
  417.                                              │    │ì
  418.      EN─ PROGRA═ INNER-PROGRAM-I«  ──────────┘    │ì
  419.                                                   │
  420.                                                   │
  421.      IDENTIFICATIO╬ DIVISION«      ──────────¢┐    ¢│ì
  422.      PROGRA═ ID« INNE╥-PROGRA═-II«           ¢│    ¢│                                             ì
  423.                                              ¢│    │ì
  424.           .                                  │    │
  425.           .                                  │    │
  426.           .                                  │    │ì
  427.                                              │    │
  428.      EN─ PROGRA═ INNER-PROGRAM-II. ──────────┘    │ì
  429.                                                   │
  430.                                                   │ì
  431.      EN─ PROGRA═ MAIN-PROGRAM.     ───────────────┘ì
  432. ì
  433. è     Thσ nex⌠ ne≈ featurσ oµ COBO╠ 8╡ i≤ probabl∙ thσ singlσ ì
  434. ì
  435. greates⌠ improvemen⌠ ove≥ thσ previou≤ standards«  Thi≤ additioε ì
  436. ì
  437. i≤ thσ ne≈ anΣ improveΣ function≤ oµ thσ PERFOR═ verb«  Iε pas⌠ ì
  438. ì
  439. COBO╠ standards¼ therσ wa≤ n∩ wa∙ t∩ proces≤ loop≤ instream«  Thσ ì
  440. ì
  441. flo≈ oµ contro∞ caε bσ illustrateΣ a≤ follows:ì
  442.  
  443. ì
  444.  
  445.                          ───────────────────ì
  446.                             Maiε Segment
  447.                          ───────────────────ì
  448.                                  │
  449.                                  └────────────────────────┐ì
  450.                                                           │
  451.            ┌─────────────────────┐                        │ì
  452.            ¢│                     ¢│                        │
  453.            │             ───────────────────              │ì
  454.            │                 Nex⌠ Segment                 │
  455.            │             ──────────────────¢─              │
  456.            │                                              │
  457.            │                      ┌───────────────────────┘
  458.            │                      │
  459.            │             ────────────────────
  460.            │                Stmt≤« iε Loop
  461.            │             ────────────────────
  462.            │                      │
  463.            └──────────────────────┘ì
  464.  
  465. ì
  466. However¼ witΦ COBO╠ 8╡ thσ flo≈ oµ contro∞ caε be instream:ì
  467.  
  468. ì
  469.                          ────────────────────
  470.                              Maiε Segment
  471.                          ────────────────────
  472.                                   │
  473.                          ────────────────────
  474.                             Stmt≤. iε Loop
  475.                          ────────────────────
  476.                                   │
  477.                          ────────────────────
  478.                              Nex⌠ Segment
  479.                          ────────────────────
  480.  
  481.  
  482.      ì
  483.      Thi≤ differencσ caε bσ seeε clearl∙ iε thσ illustrations«  ì
  484. ì
  485. Al∞ oµ thσ detail≤ oµ thσ ne≈ PERFOR═ statemen⌠ d∩ no⌠ neeΣ t∩ bσ ì
  486. ì
  487. discusseΣ a⌠ thi≤ time«  Thσ majo≥ aspect≤ oµ thσ ne≈ PERFOR═ ìèì
  488. verΓ caε bσ seeε witΦ thσ followinτ tw∩ examples« ì
  489.  
  490. ì
  491. ì
  492.                     PERFOR═ ╡ TIMESì
  493.  
  494.                          DISPLA┘ ITEM(SUBSCRIPT)ì
  495.  
  496.                          SUBSCRIP╘ ╜ SUBSCRIP╘ ½ 1ì
  497.  
  498.                     END-PERFORM.ì
  499.  
  500. ì
  501.  
  502.                     PERFOR═ UNTI╠ EO╞-HA╙-OCCURRE─ ì
  503.  
  504.                          AD─ NUMBE╥ T╧ SUB-TOTALì
  505.  
  506.                          REA─ IN-FIL┼ A╘ EN─ MOV┼ 'Yº T╧ EOFì
  507.                          
  508.                     END-PERFORM.ì
  509.  
  510. ì
  511.      Thσ las⌠ tw∩ feature≤ fil∞ u≡ thσ empt∙ spacσ iε thσ realφ ì
  512. ì
  513. oµ implementinτ structureΣ logic«  Fo≥ smal∞ routine≤ thi≤ wil∞ ì
  514. ì
  515. improvσ efficiency¼ anΣ readability¼ anΣ i⌠ wil∞ conforφ t∩ ì
  516. ì
  517. structureΣ logic«  Branchinτ t∩ anothe≥ paragrapΦ caε bσ ì
  518. ì
  519. eliminated¼ s∩ visuall∙ thσ COBO╠ sourcσ code'≤ flo≈ oµ executioε ì
  520. ì
  521. wil∞ bσ easie≥ t∩ follo≈, resultinτ iε quicke≥ prograφ ì
  522. ì
  523. maintenance« ì
  524.  
  525.      
  526.      COBO╠ 8╡ bring≤ witΦ i⌠ thσ alread∙ mentioneΣ feature≤ anΣ ì
  527. ì
  528. man∙ others¼ bu⌠ i⌠ als∩ ha≤ eliminateΣ somσ oµ thσ olΣ features«  ì
  529. ì
  530. Thσ lis⌠ oµ thσ "obsoleteó feature≤ i≤ to∩ lonτ t∩ lis⌠ iε its ì
  531. ì
  532. entirety¼ ye⌠ therσ i≤ ß gooΣ examplσ oµ thσ theor∙ behinΣ this«  ì
  533. ì
  534. Iε thσ IDENTIFICATIO╬ DIVISIO╬ therσ arσ man∙ paragraph≤ tha⌠ ì
  535. ì
  536. servσ onl∙ a≤ documentation«  Thσ reserveΣ words╗ AUTHOR¼ ì
  537. ì
  538. INSTALLATION¼ DAT┼-WRITTEN¼ DAT┼-COMPILED¼ anΣ SECURIT┘ wil∞ n∩ ì
  539. ì
  540. longe≥ bσ accepteΣ b∙ COBO╠ compilers«  Thσ COBO╠ 8╡ authorsº ì
  541. ìètheor∙ behinΣ thi≤ come≤ froφ compile≥ timσ efficiency«  Thσ ì
  542. ì
  543. compile≥ coulΣ savσ timσ b∙ onl∙ havinτ t∩ proces≤ thσ necessar∙ ì
  544. ì
  545. paragraphs«  Iµ programmer≤ wan⌠ thσ previousl∙ mentioneΣ ì
  546. ì
  547. documentatioε iε thei≥ prograφ, the∙ caε adΣ ß commen⌠ card«  ì
  548. ì
  549. Othe≥ streamlininτ oµ thσ compile≥ ha≤ takeε placσ iε thσ ne≈ ì
  550. ì
  551. COBO╠ standard« ì
  552.  
  553. ì
  554.      WitΦ al∞ oµ thσ ne≈ features¼ change≤ iε olΣ features¼ anΣ ì
  555. ì
  556. thσ cancelinτ oµ obsoletσ features¼ convertinτ program≤ writteε ì
  557. ì
  558. fo≥ COBO╠ 7┤ t∩ COBO╠ 8╡ i≤ no⌠ aε eas∙ tasδ, iµ i⌠ caε bσ donσ a⌠ ì
  559. ì
  560. all«  Onσ oµ thσ forementioneΣ purpose≤ oµ COBO╠ wa≤ upwarΣ ì
  561. ì
  562. compatibility«  Thi≤ basiπ fundamenta∞ oµ thσ COBO╠ languagσ ha≤ ì
  563. ì
  564. beeε pu⌠ oε thσ roaΣ t∩ oblivion«  Thσ convertinτ oµ presen⌠ ì
  565. ì
  566. program≤ t∩ COBO╠ 8╡ woulΣ takσ man∙ expensivσ programmer≤ lonτ ì
  567. ì
  568. labo≥ hours«  ì
  569.  
  570. ì
  571.      Mos⌠ firm≤ wil∞ no⌠ takσ thσ timσ t∩ conver⌠ thei≥ olΣ ì
  572. ì
  573. programs╗ thu≤ the∙ arσ faceΣ witΦ ß tougΦ decision«  Thσ choice≤ ì
  574. ì
  575. fo≥ eacΦ compan∙ arσ (1⌐ kee≡ programminτ witΦ ß COBO╠ 7┤ ì
  576. ì
  577. compile≥ anΣ ignorσ thσ ne≈ standard¼ (2⌐ kee≡ COBO╠ 7┤ anΣ als∩ ì
  578. ì
  579. star⌠ ne≈ program≤ unde≥ COBO╠ 85¼ o≥ (3⌐ conver⌠ COBO╠ 7┤ t∩ ì
  580. ì
  581. COBO╠ 8╡ anΣ codσ al∞ ne≈ program≤ fo≥ COBO╠ 85«  Thi≤ decisioε ì
  582. ì
  583. i≤ onσ tha⌠ wil∞ bσ cominτ u≡ ver∙ shortl∙ iε al∞ COBO╠ ì
  584. ì
  585. programminτ environments« ì
  586.  
  587.  
  588.  
  589.      Thσ problem≤ oµ convertinτ sourcσ codσ t∩ COBO╠ 8╡ froφ ì
  590. ì
  591. COBO╠ 7┤ appears t∩ havσ thσ samσ difficult∙ a≤ convertinτ PL/╔ t∩ ì
  592. ì
  593. an∙ versioε oµ COBOL«  Thi≤ similarit∙ throws ß ne≈ ligh⌠ oε thσ ì
  594. ì
  595. codinτ decision«  Firm≤ ma∙ wisΦ t∩ trea⌠ COBO╠ 8╡ a≤ ß ìèì
  596. completel∙ separatσ languagσ froφ COBO╠ 7┤ anΣ le⌠ eacΦ ì
  597. ì
  598. peacefull∙ coexis⌠ iε thσ programminτ environment«  A⌠ thσ ì
  599. ì
  600. presen⌠ time¼ thi≤ decisioε appear≤ t∩ bσ thσ mos⌠ reasonablσ ì
  601. ì
  602. one« ì
  603.  
  604. ì
  605.      Unlikσ previou≤ version≤ oµ COBOL¼ COBO╠ 8╡ wil∞ no⌠ bσ ì
  606. ì
  607. rapidl∙ implementeΣ int∩ mainstreaφ programming«  I⌠ ma∙ takσ ì
  608. ì
  609. wel∞ int∩ thσ 1990'≤ beforσ thσ upgradσ i≤ finall∙ madσ t∩ bσ aε ì
  610. ì
  611. efficien⌠ alternativσ t∩ programminτ unde≥ COBO╠ 74«  Thσ slo≈ ì
  612. ì
  613. changσ ma∙ causσ COBO╠ t∩ losσ somσ oµ it≤ popularit∙ t∩ newer¼ ì
  614. ì
  615. faster¼ anΣ morσ powerfu∞ languages«  Onl∙ timσ wil∞ tell.ì
  616.  
  617. ì
  618.      Fo≥ now¼ programminτ iε COBO╠ wil∞ remaiε almos⌠ entirel∙ ì
  619. ì
  620. unde≥ thσ 197┤ standard«  Thσ futurσ hold≤ promisinτ new≤ fo≥ ì
  621. ì
  622. COBO╠ programmer≤ iε thσ wa∙ oµ ne≈ feature≤ anΣ improvement≤ oµ ì
  623. ì
  624. olΣ features«  Thσ ne≈ standarΣ oµ COBO╠ programminτ exists¼ ye⌠ ì
  625. ì
  626. i⌠ wil∞ bσ somσ timσ beforσ thσ accepteΣ standarΣ become≤ COBO╠ ì
  627. ì
  628. 85«  Eveε thougΦ COBO╠ 8╡ bring≤ witΦ i⌠ instreaφ logic¼ bette≥ ì
  629. ì
  630. defineΣ verbs¼ anΣ bette≥ documentation¼ COBO╠ 7┤ stil∞ stand≤ ì
  631. ì
  632. alonσ a⌠ thσ to≡ oµ thσ programminτ hill.ì
  633.  
  634. .paè.op
  635. .he                
  636. .ul
  637. ì
  638.  
  639. ì
  640.                            Work≤ Consulted
  641.  
  642.  
  643.  
  644. Brown¼ P« R« anΣ Gwilliφ V.«  User'≤ Guidσ t∩ COBO╠ 85«  HalsteΣ ì
  645.      Press║ Ne≈ York¼ Ne≈ York«  436p«  1985.
  646.  
  647.  
  648. Garfunkel¼ Jerome«  Thσ COBO╠ 8╡ Examplσ Book«  Johε Wile∙ ª Sons:
  649.      Ne≈ York¼ Ne≈ York«  322p«  1987.
  650.  
  651.  
  652. I.B.M«  IB═ V╙ COBO╠ fo≥ OS/VS¼ releasσ 2«  Internationa∞ ì
  653.      Busines≤ Machines║ Saε Jose¼ California«  544p«  1986.
  654.  
  655.  
  656. Nirmal¼ Barr∙ K.«  Programminτ Standard≤ anΣ Guidelines║ COBO╠ Edition.
  657.      Prentice-Hall«  226p«  1987.
  658.