1. COBOLã®æŠèŠãšåºæ¬æ§é
COBOLïŒCommon Business-Oriented LanguageïŒã¯ãããžãã¹åéã«ãããããŒã¿åŠçãäž»ã«æããããã«éçºãããããã°ã©ãã³ã°èšèªã§ãããŸããæåã®ããŒãžã§ã³ã¯1959幎ã«ç»å ŽããŸãããããã®æ§é ãšç¹æ§ããçŸåšã§ãå€ãã®äž»èŠãªéèæ©é¢ãæ¿åºæ©é¢ã§åºãå©çšãããŠããŸãã
ãã®èšèªã¯ãåæ¥çãªèšç®ãããããã®ããããŠå®çšçãªããã°ã©ãã³ã°èšèªã§ãååæŒç®ãæååæäœããã¡ã€ã«æäœãªã©ããžãã¹ã®ãã£ãŒã«ãã§é »ç¹ã«çšããããæäœããµããŒãããŠããŸãããŸããè±èªã«è¿ãèªç¶ãªè¡šçŸãæã€ããšãç¹å£®ã®äžã€ãšããŠç¥ãããŠããŸãã
以äžã§ã¯ãCOBOLã®äž»èŠãªç¹åŸŽãåºæ¬çãªæ§æãããŒã¿åãå¶åŸ¡æ§ç¯ã«ã€ããŠãããããã説æããããŸãã
1.1 COBOLã®æŽå²ãšç¹åŸŽ
COBOLã®éçºã¯ã1959幎ã«ã¢ã¡ãªã«é²è¡çã«ããèšç«ãããCODASYLïŒConference on Data System LanguagesïŒãšããå§å¡äŒã«ãã£ãŠéå§ããããã®çµæ1960幎ã«æåã®COBOLèšèªä»æ§ãå®æããŸããã
ãŠãŒã¶ãŒãã¬ã³ããªãŒãªæ§æãç¹åŸŽã§ãè±èªã«è¿ãèªç¶ãªè¡šçŸãæã€ããšããéæè¡è ã§ãããã°ã©ã ãç解ãããããšãããŠããŸãããŸããCOBOLããã°ã©ã ã¯ä»»æã®ããŒããŠã§ã¢ã§åã³ã³ãã€ã«ããã«åäœå¯èœãªããã移æ€æ§ãé«ããšãããŠããŸãã
COBOLã¯é·ãæŽå²ã®äžã§æ§ã ãªæ¹ä¿®ãåããŠãããçŸåšã§ãå€ãã®äŒæ¥ãçµç¹ã§äœ¿ãããŠããŸããç¹ã«å ¬å ±äº€éæ©é¢ãéèæ©é¢ãä¿éºäŒç€Ÿãªã©ã®ããžãã¹ã·ã¥âã ã§åºãæ¡çšãããŠããŸãã
1.2 COBOLã®æ§æã®åºæ¬åœ¢åŒ
COBOLã®ããã°ã©ã ã¯åã€ã®éšåïŒIDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISIONïŒã«åããããŸããããããã®éšåã¯ç¹å®ã®ç®çãæã¡ãããã°ã©ã ã®èŠçŽ ãæ§æããŸãã
IDENTIFICATION DIVISIONã¯ããã°ã©ã ã®ååãäœè ã®æ å ±ãªã©ãèšå®ããå ŽãšããŸããENVIRONMENT DIVISIONã¯ããã°ã©ã ãåäœããç°å¢ïŒããŒããŠã§ã¢ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã çïŒãå®çŸ©ããŸããDATA DIVISIONã§ã¯ããã°ã©ã ã§äœ¿çšããããŒã¿ã®åãæ§é ãå®çŸ©ããŸããæåŸã«ãPROCEDURE DIVISIONã§ã¯å ·äœçãªåœä»€ã®èšè¿°ãè¡ãããŸãã
COBOLã®èšèªæ§é ã¯è±èªã«è¿ãåœä»€ã§ããã©ã°ã©ããšã»ã¯ã·ã§ã³ãšåŒã°ããåäœã§èšè¿°ãè¡ããŸãããããã®ç¹æ§ã«ãããCOBOLã®ããã°ã©ã ã¯ä»ã®èšèªãšæ¯ã¹ãŠãéåžžã«å¯èªæ§ãé«ããšèšããŸãã
1.3 COBOLã®ããŒã¿åãšå€æ°
COBOLã§ã¯ãDATA DIVISIONå ã«ããŒã¿ã®å®çŸ©ãäœçœ®ããŸãããã®äžã§äœ¿çšãããåºæ¬çãªããŒã¿åã«ã¯æ°å€å(NUMERIC)ãè±å€§æåå(ALPHABETIC)ãè±å€§æåãšèšå·ã®å(ALPHANUMERIC)ããããŠæ°å€ãšèšå·ã®å(ALPHANUMERIC-EDITED)ããããŸãã
COBOLã®å€æ°ã¯å¯å€é·ã§ãªããå¿ ãåºå®é·ãšãªããŸãããŸãå€æ°ãå®çŸ©ããéã«ã¯ãã¬ãã«ãã³ããŒãšåŒã°ããé ç®ã§éå±€æ§é ãæãããããšãã§ããŸãã
ããã«ããCOBOLã§ã¯ãæ§ã ãªæ§é ã䌎ã£ãããŒã¿ãè¡šãã®ã«éåžžã«åŒ·åã§ããŸããã®ããŒã¿åŠçã«ã¯æ確ã§åŒ·åºãªåãã§ãã¯ãåãã£ãŠããŸãã
1.4 COBOLã®å¶åŸ¡æ§é ãšãããŒ
COBOLã®å¶åŸ¡æ§é ã¯ãPROCEDURE DIVISIONå ã§å®çŸ©ãããŸããäž»ãªå¶åŸ¡æã«ã¯ãæ¡ä»¶åå²ãæ±ãIF-THEN-ELSEãç¹°ãè¿ããæ±ãPERFORMããããŠããŒã¿ã®å ¥åºåãæ±ãCRUDïŒCREATE, READ, UPDATE, DELETEïŒæäœããããŸãã
COBOLã®ãããŒå¶åŸ¡ã¯ãåºæ¬çã«ã¯äžããäžãžãšåœä»€ãå®è¡ããŸãããGOTOæã䜿ãããšã§ä»»æã®åœä»€ã«å¶åŸ¡ã移ãããšãå¯èœã§ãããã ãçŸä»£ã®ãœãããŠã§ã¢éçºã§ã¯ãGOTOæã®äœ¿çšã¯å¶éãããåŸåã«ãããŸãã
ãŸããCOBOLã¯å€§éã®ããŒã¿åŠçãè¡ãããã«ããçšãããããã¡ã€ã«æäœãé«åºŠã«ãµããŒãããŠããŸãããã®ç¹ããããžãã¹åéã§ã®å€çšæ§ãæ¯ããäžå ãšãããŸãã
2. COBOLããã°ã©ã ã®åºæ¬çãªæžãæ¹
ã¢ãã³ãªããã°ã©ãã³ã°èšèªããèŠãã°ãCOBOLã¯äžèŠé£è§£ã«æãããããããŸããããå®éã«ã¯çŽæçãªåœä»€äœç³»ãæã£ãŠããŸããããã§ã¯ãCOBOLããã°ã©ã ã®åºæ¬çãªæžãæ¹ã«ã€ããŠè§£èª¬ããŠãããŸãã
2.1 ããã°ã©ã ã®éå§ãšçµäº
COBOLããã°ã©ã ã¯ãIDENTIFICATION DIVISION ã§å§ãŸããŸããããã¯ããã°ã©ã ã®åºæ¬æ å ±ãäŸãã°ããã°ã©ã ã®ååãäœè ãªã©ãèšè¿°ããå Žæã§ãã
次ã«ãPROCEDURE DIVISION ã¯ããã°ã©ã ãè¡ãå ·äœçãªåŠçãèšè¿°ããéšåã§ããããã§å®éã®ããã°ã©ã ã®ããžãã¯ãæžãããŸãã
ãããŠæåŸã«ãSTOP RUN æã䜿ã£ãŠããã°ã©ã ãçµäºããŸãããããCOBOLããã°ã©ã ã®éå§ããçµäºãŸã§ã®åºæ¬çãªæµããªã®ã§ãã
2.2 åå²åŠçã®æžãæ¹
COBOLã§ã¯ãIF…ELSE…END-IF ãšããæ§æãçšããŠåå²åŠçãè¡ããŸããããã«ãããæ¡ä»¶ã«å¿ããŠããã°ã©ã ã®æµããå¶åŸ¡ããããšãå¯èœã§ãã
ããšãã°ããIF A > B THEN…ELSE…END-IFãã®ããã«èšè¿°ããŸããæ¡ä»¶åŒãæç«ããå ŽåïŒAãBãã倧ããå ŽåïŒã«ã¯THENã®åŸã®åŠçããæç«ããªãå Žåã«ã¯ELSEã®åŸã®åŠçãå®è¡ãããŸãã
ããã«ãããCOBOLããã°ã©ã å ã§è€éãªæ¡ä»¶åå²ãåŠçããããšãã§ããŸãã
2.3 ã«ãŒãåŠçã®æžãæ¹
å€ãã®ããã°ã©ãã³ã°èšèªãšåæ§ãCOBOLã«ãã«ãŒãåŠçãå®è£ ããæ©èœããããŸãã PERFORM…UNTIL ã«ãã£ãŠã«ãŒããäœæããããšãã§ããŸãã
äŸãã°ããPERFORM UNTIL A > B … END-PERFORMãã®ããã«èšè¿°ããŸããããã¯å€æ°AãBãã倧ãããªããŸã§ã«ãŒããç¶ãããšããæå³ã«ãªããŸãã
ãã®ãããªã«ãŒãåŠçã«ãã£ãŠãäžé£ã®åœä»€ãç¹°ãè¿ãè¡ãããšãå¯èœãšãªããŸãã
2.4 ãšã©ãŒåŠçã®æžãæ¹
COBOLã§ã¯ãON ERROR ãã¬ãŒãºã䜿çšããããšã§ãšã©ãŒåŠçãå®è£ ããããšãå¯èœã§ãã
ãã®ãã¬ãŒãºã¯ãäœããã®åœä»€ã倱æããæã«å®è¡ãããåœä»€ãæå®ããŸããã… ON ERROR DISPLAY “Error!”ãã®ããã«èšè¿°ãããšããšã©ãŒãçºçããæã« “Error!” ãšåºåããŸãã
COBOLãæäŸãããã®ãããªæ©èœã«ãããç©æ¥µçã«ãšã©ãŒåŠçãè¡ãäºã§ãå ç¢ãªããã°ã©ã ãäœãäžããããšãå¯èœãšãªããŸãã
3. COBOLã§ã®ããŒã¿æäœã®åºæ¬
COBOLïŒCommon Business-Oriented LanguageïŒã¯ãããžãã¹ã®ããŒã¿åŠçãç®çãšããããã°ã©ãã³ã°èšèªã§ããäžæ¹ã§ãããŒã¿æäœããã®èšèªã®å€§ããªç¹æ§ãšèšããã§ããããããã§ã¯ãåºæ¬çãªããŒã¿ã®èªã¿åããšæžã蟌ã¿ãããŒã¿ã®æ€çŽ¢ãšãœãŒãã£ã³ã°ãããŒã¿ã®èšç®åŠçããããŠãã¡ã€ã«æäœã«ã€ããŠè§£èª¬ããŸãã
ãããã®æäœã¯ãçŸå Žã§ãã䜿ãããå®è·µçãªæè¡ã§ããCOBOLã®åºæ¬æŠå¿µã«ã€ããŠç解ããå¹çããã³ãŒãã£ã³ã°ãã§ããããã«ãªããŸãããã
ãªãã詳现ãªã³ãŒãäŸã现ããªææ³ã«ã€ããŠã¯ç¥ããŸãããå®è·µçãªç解ã®ããã®åèã«ãªãã°å¹žãã§ãã
3.1 ããŒã¿ã®èªã¿åããšæžã蟌ã¿
ãŸãã¯ãããŒã¿ã®èªã¿åããšæžã蟌ã¿ã«ã€ããŠèããŸãããããã®æäœã¯COBOLã®åºæ¬çãªããŒã¿æäœã§ãINPUTãšOUTPUTã¹ããŒãã¡ã³ãã䜿çšããŸãã
ããšãã°ãããŒã¿ããŒã¹ããããŒã¿ãèªã¿èŸŒã¿ããããå¥ã®å Žæã«æžã蟌ãããšããåŠçãå¯èœã§ããããã«ãããæ å ±ã®æµéãšä¿åãã¹ã ãŒãºã«è¡ãããŸãã
ç¹ã«å€§éã®ããŒã¿ãæ±ãå Žåããããã®ã¹ããŒãã¡ã³ãã¯éåžžã«å匷ãããŒã«ãšãªããŸãã
3.2 ããŒã¿ã®æ€çŽ¢ãšãœãŒãã£ã³ã°
次ã«ãããŒã¿ã®æ€çŽ¢ãšãœãŒãã£ã³ã°ã«ã€ããŠè§£èª¬ããŸããCOBOLã¯å€§èŠæš¡ãªããŒã¿ãåãæ±ãããšãå€ãããããã®æ©èœã¯éåžžã«éèŠã§ãã
ããŒã¿ã®æ€çŽ¢ã¯ãSEARCHã¹ããŒãã¡ã³ãã䜿çšããŸããããã«ãããç¹å®ã®æ¡ä»¶ã«äžèŽããããŒã¿ããç¹å®ã®ããŒå€ãæã€ã¬ã³ãŒããããŒã¿ããèŠã€ããããšãã§ããŸãã
ãããŠãããŒã¿ã®ãœãŒãã£ã³ã°ã¯SORTã¹ããŒãã¡ã³ãã䜿çšããŸããããã«ãããç¹å®ã®é åºã§ããŒã¿ãæŽåããããšãã§ããŸãã
3.3 ããŒã¿ã®èšç®åŠç
ããã«ãããŒã¿ã®èšç®åŠçãCOBOLã®äž»èŠãªæ©èœã§ããADD, SUBTRACT, MULTIPLY, DIVIDEãªã©ãç®è¡æŒç®åã䜿çšããèšç®ãå¯èœã§ãã
ãããã®èšç®æ©èœã䜿çšããããšã§ã財åæ å ±ã®éèšãäºæž¬ãªã©ãããžãã¹ã«ãããå€æ§ãªèšç®åŠçãå¹ççã«è¡ããŸãã
ç¹ã«ãè€éãªããžãã¹ããžãã¯ãå®çŸããéã«ã¯ãããŒã¿ã®èšç®åŠçã絶察ã«æ¬ ãããŸããã
3.4 ãã¡ã€ã«æäœã®åºæ¬
æåŸã«ããã¡ã€ã«æäœã®åºæ¬ã«ã€ããŠèª¬æããŸããCOBOLã«ã¯OPEN, READ, WRITE, CLOSEãªã©ã®ãã¡ã€ã«æäœã¹ããŒãã¡ã³ããçšæãããŠããŸãã
ããããçšããŠãããŒã¿ããŒã¹ã®æ å ±ããã¡ã€ã«ã«ä¿åããããéã«ãã¡ã€ã«ããããŒã¿ããŒã¹ã«æ å ±ãåã蟌ãã ãããæäœãå¯èœã§ãã
ãããã®ã³ãŒããç解ããé©åã«å©çšããããšã§ãå¹ççãªããŒã¿æäœãè¡ãããšãã§ããŸãã
4. COBOLã®ã³ãŒãã£ã³ã°èŠçŽãšãã¹ããã©ã¯ãã£ã¹
æ¬ç« ã§ã¯ãCOBOLã®ã³ãŒãã£ã³ã°èŠçŽãšãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠè§£èª¬ããŸããããããã®éèŠæ§ãç解ããããšã§ããã質ã®é«ããããã©ãŒãã³ã¹åªããããã°ã©ã ãæžãããšãå¯èœãšãªããŸãã
4.1 ã³ãŒãã£ã³ã°èŠçŽã®æ矩
COBOLã®ã³ãŒãã£ã³ã°èŠçŽã¯ããœãŒã¹ã³ãŒãã®å質ãä¿ã¡ãå¯èªæ§ãé«ããããã®ã¬ã€ãã©ã€ã³ãšãªã£ãŠããŸããããã«ããå ±åã§ã®éçºãåŸäžãžã®ãœãŒã¹ã³ãŒãã®åŒãç¶ããã¹ã ãŒãºã«è¡ããŸãã
ãŸããæŽåãããã³ãŒãã£ã³ã°èŠçŽããããšãããèªäœãååŠè ã«å¯Ÿããæè²è³æãšãªããäžè²«æ§ã®ããã³ãŒãã£ã³ã°ã¹ã¿ã€ã«ã確ä¿ã§ããŸããçµæãšããŠãã°ã®çºçãæããããšãå¯èœãšãªããŸãã
æåŸã«ãã³ãŒãã£ã³ã°èŠçŽã®éµå®ã¯ãœãããŠã§ã¢éçºã®ãããã§ãã·ã§ããªãºã ã瀺ãäžã€ã§ããããŸããäžè²«ããèŠçŽãå®ãããšã§ãæè¡è ãšããŠã®ä¿¡é Œæ§ãé«ãŸããŸãã
4.2 ãªãŒããã«ãªã³ãŒããæžãããã®èŠçŽ
ãªãŒããã«ãªã³ãŒããæžãããã®èŠçŽãšã¯ãå¯èªæ§ãåäžãããããã®ã«ãŒã«ã®ããšãèšããŸããå ·äœçã«ã¯ãå€æ°åã®ä»ãæ¹ãã³ã¡ã³ãã®æžãæ¹ãã€ã³ãã³ãã®ä»æ¹ãªã©ã該åœããŸãã
ãããã®èŠçŽã¯ãä»ã®äººãã³ãŒããç解ããããããããã ãã§ãªããèªåèªèº«ãæ°ã¶æåŸãæ°å¹ŽåŸã«ã³ãŒããèŠè¿ãããšãã«ç解ããããããããã«ãéèŠã§ãã
ç¹ã«ãæå³ã®ããå€æ°åããååãªã³ã¡ã³ãã¯ã³ãŒãã®ç解ã«å€§ããå¯äžããŸãã粟緻ã«æžãããã¹ãç®æãšç°¡æœã«æžãã¹ãç®æãæ確ã«ããããšã倧åã§ãã
4.3 ããã©ãŒãã³ã¹ãåäžãããèŠçŽ
ããã©ãŒãã³ã¹ãåäžãããèŠçŽã§ã¯ãå¹ççãªã¢ã«ãŽãªãºã ã®éžæããäžå¿ èŠãªåŠçã®æé€ãªã©ãäž»ã«èããããŸãã
äŸãã°ã倧èŠæš¡ãªããŒã¿ãæ±ãå Žåã«ã¯ãããŒã¿ã¢ã¯ã»ã¹ã®æé©åã䞊ååŠçã®æŽ»çšãªã©ãèŠçŽãšããŠå®ããããããšããããŸãããŸããã¡ã¢ãªç®¡çã«é¢ããèŠçŽããããã©ãŒãã³ã¹åäžã«å€§ããªåœ±é¿ãäžããŸãã
ãã®ãããªèŠçŽãéµå®ããããšã§ãçè³æºæ§ãšå¿«é©ãªåäœãä¿ããããŠãŒã¶äœéšã®åäžã«ç¹ãããŸãã
4.4 ãã¹ããã©ã¯ãã£ã¹ãšã¯
ãã¹ããã©ã¯ãã£ã¹ãšã¯ãäžè¬çã«æåããããããšãããæ¹æ³è«ãææ³ã®ããšãæããŸããCOBOLã³ãŒãã£ã³ã°ã«ããããã¹ããã©ã¯ãã£ã¹ã¯ãé·å¹Žã®çµéšããåŸãããç¥èŠãåºã«ç¢ºç«ãããŠããŸãã
å
·äœçã«ã¯ããã¹ãé§åéçº(TDD)ã
ãã¹ããã©ã¯ãã£ã¹ã®å°å ¥ãšæŽ»çšã¯ãå¹çãšå質ã®ãã©ã³ã¹ãåãããšã«éèŠãªåœ¹å²ãæãããŸããææŠãã絶ããåŠã¶å§¿å¢ãæã€ããšãéèŠã§ãã
5. COBOLã§ã®ãããã°ãšãã¹ãã®åºæ¬
éçºéçšã«ãããŠã¯ããããã°ãšãã¹ããéèŠãªèŠçŽ ãšãªããŸããããã¯COBOLããã°ã©ãã³ã°ã«ãããŠãå€ãããŸããããã®ç« ã§ã¯ãCOBOLã«ããããããã°ãšãã¹ãã®åºæ¬ã«ã€ããŠè§£èª¬ããŸãã
5.1 ãããã°ã®ããã®ããŒã«ãšææ³
COBOLã§ãããã°ãããéã«ã¯ãå°çšã®ãããã°ããŒã«ãçšããããšãäžè¬çã§ãããããã®ããŒã«ã¯ãã³ãŒãäžã§äœãèµ·ãã£ãŠããããå¯èŠåããåé¡ã®åå ãç¹å®ããã®ã«éåžžã«åœ¹ç«ã¡ãŸããäž»ãªãããã°ããŒã«ã«ã¯STEPLIBãXpediterãInterTestãªã©ããããŸãã
ãããã®ããŒã«ãçšããŠè¡ãææ³ãšããŠã¯ããã¬ãŒã¯ãã€ã³ãã®èšçœ®ãå€æ°ã®ãŠã©ãããã¹ãããå®è¡ãªã©ããããŸãããããã¯äžéšãæããäŸã§ããããããã°ã®éã«ã¯ããããçµã¿åãããŠäœ¿çšããããšãå€ãã§ãã
å ·äœçã«ã¯ãã³ãŒãå ã®ä»»æã®äœçœ®ã«ãã¬ãŒã¯ãã€ã³ããèšçœ®ããããšã§ããã®å°ç¹ã§ããã°ã©ã ã®å®è¡ãäžæåæ¢ãå€æ°ã®å€ã確èªããããšãã§ããŸãããã®æãç°åžžãªå€ãæã€å€æ°ãååšããå Žåãããããã°ã®åå ã§ããå¯èœæ§ãé«ãã®ã§ããã®å€æ°ãã©ã®ããã«äœ¿ãããŠãããã調ã¹ãããšã次ã®ã¹ããããšãªããŸãã
5.2 ãã¹ãã®çš®é¡ãšææ³
ãã¹ãã«ã¯æ§ã ãªçš®é¡ããããŸãããCOBOLããã°ã©ãã³ã°ã§ã¯åäœãã¹ããçµåãã¹ããã·ã¹ãã ãã¹ããªã©ãäžè¬çã§ããåäœãã¹ãã§ã¯åã ã®ããã°ã©ã ããçµåãã¹ãã§ã¯è€æ°ã®ããã°ã©ã ãçµåãããã®ããã·ã¹ãã ãã¹ãã§ã¯å šäœã®ã·ã¹ãã ã察象ã«ãã¹ããè¡ããŸãã
ãã¹ãã®ææ³ãšããŠã¯ããŸããã¹ãã±ãŒã¹ãèšèšããŸãããã¹ãã±ãŒã¹ã¯ãããã°ã©ã ãæ£ããåãããšã確èªããããã®ã·ããªãªã§ãéåžžã¯ãèŠæ Œæžãèšèšæžãªã©ãå ã«äœæããŸãã
ãã¹ãã±ãŒã¹ãå ã«ãã¹ããè¡ããããã°ã©ã ãæå³ããéãã®åäœãããããšã確èªããŸãããŸããäžå ·åãçºèŠãããå Žåã¯ããããã°ãå床è¡ãããã®äžå ·åãä¿®æ£ããããšãå¿ èŠã«ãªããŸãã
5.3 ãã¹ãèªååã®èãæ¹
ãã¹ãäžæ¬åã®èãæ¹ã¯ããã¹ãããã»ã¹ã«ãããåŽåãæžãããååŸé©åœæã«ãã誀ããæ»ãããããã«éèŠã§ãããã¹ãããŒã«ãçšãããåçš®ãã¹ããèªååããããšã§ãããå¹ççã«ããã確å®ã«ãã¹ãããã»ã¹ãé²ããããšãã§ããŸãã
COBOLããã°ã©ãã³ã°ã«ãããŠã¯ãããšãã°JunitãCucumberãšãã£ãããŒã«ã䜿ãããããšããããŸãããããã®ããŒã«ã«ã¯ãåã ã«ç¹æãªç¹åŸŽãçšéããããšã©ãŒããšå®è¡çµæãããã«ç¢ºèªã§ãã䟿å©ãããããŸãã
ããããã©ã®ãããªããŒã«ãå°å ¥ããããåé¡ã§ãããã®ããã«ã¯ãããžã§ã¯ãã®èŠæš¡ãå 容ãæéçã®æ¡ä»¶ãèŠãŠãäžçªé©ããããŒã«ãéžæããŸãã
5.4 ãã°ãé²ãããã°ã©ãã³ã°æè¡
ãã°ãé²ãããã®ããã°ã©ãã³ã°æè¡ãšããŠãCOBOLã§ã¯æ§é åããã°ã©ãã³ã°ãªã©ãæå¹ã§ããæ§é åããã°ã©ãã³ã°ã¯ãããã°ã©ã ãããããããç解ã§ããä¿å®æ§ãé«ããšãããŠããŸãã
ãŸããã³ãŒãã¬ãã¥ãŒããã°é²æ¢ã«å¯äžããŸããä»äººã®ç®ã§ã³ãŒãããã§ãã¯ããããšã§èŠèœãšããé²ãããšãã§ããŸãããã®ããã»ã¹ã«ã€ããŠããããŒã«ã䜿ã£ãŠå¹çåããããšãå¯èœã§ãã
ãããŠãå®æçã«ãªãã¡ã¯ã¿ãªã³ã°ãè¡ãããšãéèŠã§ãããªãã¡ã¯ã¿ãªã³ã°ã¯ãã³ãŒãã®çµã¿æ¿ããè¡ãããšã§ãã³ãŒãã®ã¯ãªãŒã³ã¢ãããããã©ãŒãã³ã¹ã®åäžãè¡ããéæ¥çã«ãã°ã®çºçãé²ããŸãã
6. COBOLã®ä»åŸãšãã£ãªã¢ãã¹
COBOLã¯ããã£ã³ããã¯ãä¿éºãæ¿åºãªã©ãšãã£ããå€çš®å€æ§ãªæ¥çã§ããŸã ã«å¿ èŠãšãããŠããŸããã«ãããããããæ°èŠã®COBOLãšã³ãžãã¢ãæ¥éã«æžå°ããŠãããšãã課é¡ããããŸãã
COBOLã«æºãããšã³ãžãã¢ã«ãšã£ãŠã¯ããŸãã«é絊ãã©ã³ã¹ãåªããç°å¢ãšãªã£ãŠããŸãããããããã®éé¢ãšããŠãå°æ¥æ§ãæ±ããæ°èŠåŠç¿è ãããããšãäžéææããããããããŸããã
æ¬ç« ã§ã¯ããããªCOBOLã®ä»åŸãšãã£ãªã¢ãã¹ã«ã€ããŠèå¯ããŸãã
6.1 COBOLåžå Žã®çŸç¶ãšãã¬ã³ã
çµ±èšã«ããã°ãå šäžçã®éè¡ã®70ïŒ ä»¥äžãCOBOLã§æžãããã·ã¹ãã ã䜿çšããŠããŸããããã¯ããã®ä¿¡é Œæ§ãšå ç¢æ§ãè©äŸ¡ãããŠããçµæã§ãããå€ãã®äŒæ¥ãCOBOLç³»ã®ã·ã¹ãã ãå°å ¥ããæŽæ°ãç¶ããŠããŸãã
ããããäžæ¹ã§æ°ãã«COBOLãåŠã¶ãšã³ãžãã¢ãæžå°ããŠããæ°æ¥ããããŸãããã®ãããªèæ¯ããCOBOLãç¶æã»éçºã§ãããšã³ãžãã¢ãäžè¶³ããå¯èœæ§ãèµ·ããã€ã€ãããŸãã
çµæãšããŠãCOBOLãšã³ãžãã¢ã¯æ±äººåžå Žã§ãåŒãåããå€ããé«åå ¥ãåŸãããšãå¯èœãšãªã£ãŠããŸãã
6.2 COBOLãšã³ãžãã¢ã®ãã£ãªã¢ãã¹
äŒæ¥ã®å€ãã¯COBOLãä»ããããã¯ãšã³ãã®éçºãç¶æäœæ¥ã«ããããšã³ãžãã¢ãæ±ããŠããŸãããŸããããŸãçµéšãã¹ãã«ãç©ãã COBOLãšã³ãžãã¢ã¯è€æ°ã®ãšã³ãžãã¢ããŸãšãããªãŒããŒããããŠãããžã§ã¯ããããŒãžã£ãŒãã·ã¹ãã ã¢ããªã¹ããŸã§æé²ã®éãåºãã£ãŠããŸãã
ããã¯COBOLãããžãã¹ã¯ãªãã£ã«ã«ãªé åãæ±ããããäžçŽãäžçŽã®åœ¹è·ã§ããã°ããã«èŠåã£ãå ±é ¬ãæåŸ ã§ããããã§ãã
ãŸããç¬ç«ããŠããªãŒã©ã³ã¹ãšããŠå¯æ¥ããããã¯äž»æ¥ãšããŠæŽ»åããããšãå¯èœã§ãããã®å Žåããããžã§ã¯ãã«ãã£ãŠã¯å¹ŽåãçžåœäŒžã³ãããšãããã§ãããã
6.3 COBOLãšã³ãžãã¢ã«æ±ããããã¹ãã«
COBOLãšã³ãžãã¢ã«æ±ãããã第äžã®ã¹ãã«ã¯ããã¡ããCOBOLã«é¢ããç¥èãšæè¡åã§ããããããããã ãã§ã¯ãããŸãããçŸç¶ã®ã·ã¹ãã ãææ¡ããé©åãªä¿®æ£ãæ¹è¯ãææ¡ã§ããæ¹è©åãåæåãéèŠãšãªã£ãŠããŸãã
ãŸããããŒã ã§ä»äºãããããšãå€ãã®ã§ãã³ãã¥ãã±ãŒã·ã§ã³èœåãæ¬ ãããŸãããäžæµå·¥çšã®èŠä»¶å®çŸ©ããäžæµå·¥çšã®ãã¹ãã£ã³ã°ãŸã§ãã³ããªã³ã°ããããšããããããããããå·¥çšã®ç¥èãæ±ããããŸãã
ããã«ãæ°ããæè¡ãžã®é©å¿åãå¿ èŠã§ããCOBOLã ãã§ã¯ãªããåšèŸºã®ãã¯ãããžãŒãç解ã䜿ãããªããããšãæ±ããããŸãã
6.4 COBOLãåŠã¶ããã®ãªãœãŒã¹
COBOLãåŠã¶ããã®ãªãœãŒã¹ã¯å€å²ã«ããããŸãããªã³ã©ã€ã³ã®æè²ãã©ãããã©ãŒã ã§ã¯ãåºæ¬ããå¿çšãŸã§ã COBOLã®ã³ãŒã¹ãæã£ãŠããŸãããŸããæžç±ãè±å¯ã«æã£ãŠããŸãã
ãŸããå®éã«COBOLã䜿çšããŠããäŒæ¥ã§ã€ã³ã¿ãŒã³ã·ãããã¢ã«ãã€ããããããšã§ããªã¢ã«ãªçµéšãç©ãããšãå¯èœã§ããå®è·µã®å Žã§åŸãçµéšã¯ãçè«ã ãã§ã¯åŸãããªããã®ã§ãã
æåŸã«ãç¥èãæ·±ããŠããããã«ã¯å®æçãªç¶ç¶åŠç¿ã®éèŠã§ããæ°ããªæ å ±ãæ¹è¯ãããææ³ã«ã€ããŠåŠã³ç¶ããããšã§ãCOBOLãšã³ãžãã¢ãšããŠæ¥ã ã®ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
åèæç®
![](https://image.itmedia.co.jp/ait/articles/0906/11/r13cobol0201.jpg)