COMTRAN

COMTRAN

COMTRAN (COMmercial TRANslator) is an early programming language developed at IBM. It was intended as the business programing equivalent of the scientific programming language FORTRAN (FORmula TRANslator). It served as one of the forerunners to the COBOL language. Developed by Bob Bemer, in 1957, the language was the first to feature the programming language element known as a picture clause.

Contributions to COBOL

Several elements of COMTRAN were incorporated into COBOL:
*Picture clause. (See below.)
*Paragraphing: dividing code into paragraphs (with line breaks not significant).
*Paragraph names. Assigning names to paragraphs, and jumps (GO TO's) are to a paragraph name, not to a line number.
*AT END clause on file input operations.
*Figurative constant HIGH-VALUE.
*Passing a numeric value (RETURN-CODE) back to the operating system when the program terminates.

Picture clause

A picture clause element defines the length of any given datum, much like a dictionary defines words. In particular a picture clause determines whether the datum contains letters and numbers, and other characteristics of the data, including format, size, and data type.

ample program

This is a sample COMTRAN program, doing payroll calculations. (From IBM F28-8043 Commercial Translator General Reference Manual.) [ [http://bitsavers.org/pdf/ibm/7090/F28-8043_CommercialTranslatorGenInfMan_Ju60.pdf] (pdf, 8.2M) (See Pg 87.)]

01001 *PROCEDURE 01002 CALL (EMPLOYEE.NUMBER) EMPLOYNO, 01003 (BONDEDUCTION) BONDEDUCT, 01004 (BONDENOMINATION) BONDENOM, 01005 (BONDACCUMULATION) BONDACCUM, 01006 (INSURANCE.PREM) INSPREM, 01007 (RETIREMENT.PREM) RETPREM, 01008 (DEPARTMENT.TOTAl) DPT. 01009 START. OPEN ALL FILES. 01010 GET.MASTER. GET MASTER, AT END DO END.OF.MASTERS. 01011 GET.DETAIL. GET DETAIL, AT END GO TO END.OF.DETAILS. 01012 COMPARE.EMPLOYEE.NUMBERS. GO TO COMPUTE.PAY WHEN DETAIL EMPLOYNO 01013 IS EQUAL TO MASTER EMPLOYNO, LOW.DETAIL WHEN DETAIL 01014 EMPLOYNO IS LESS THAN MASTER EMPLOYNO. 01015 HIGH.DETAIL. MOVE 'M' TO MASTER ERRORCODE, FILE MASTER IN 01016 ERROR.FILE. 01017 GET MASTER, AT END DO END.OF.MASTERS. 01018 GO TO COMPARE.EMPLOYEE.NUMBERS. 02001 LOW.DETAIL. MOVE 'D' TO DETAIL ERRORCODE, FILE DETAIL IN 02002 ERROR.FILE. 02003 GO TO GET.DETAIL. 02004 END.OF.MASTERS. IF DETAIL EMPLOYNO = HIGH.VALUE THEN GO TO 02005 END.OF.RUN OTHERWISE SET MASTER EMPLOYNO = HIGH.VALUE. 02006 END.OF.DETAILS. IF MASTEREMPLOYNO = HIGH.VALUE THEN GO TO 02007 END.OF.RUN OTHERWISE SET DETAIL EMPLOYNO = HIGH.VALUE, GO 02008 TO COMPARE.EMPLOYEE.NUMBERS. 02009 END.OF.RUN. MOVE CORRESPONDING GRAND.TOTAL TO PAYRECORD, FILE 02010 PAYRECORD, CLOSE ALL FILES. 02011 STOP 1234. 02012 COMPUTE.PAY. IF DETAIL HOURS IS GREATER THAN 40 THEN SET DETAIL 02013 GROSS = (DETAIL HOURS - 40) * MASTER RATE * 1.5. 02014 SET DETAIL GROSS = DETAIL GROSS + MASTER RATE * 40, DO 02015 FICA.ROUTINE, DO WITHHOLDING.TAX.ROUTINE. 02016 IF MASTER BONDEDUCT IS NOT EQUAL TO ZERO THEN DO 02017 BOND.ROUTINE. 02018 DO SEARCH FOR INDEX = 1(1)12. 02019 NET. SET PAYRECORD NETPAY = DETAIL GROSS - DETAIL FICA - DETAIL 02020 WHT -DETAIL RETIREMENT - DETAIL INSURANCE - DETAIL 02021 BONDEDUCT.

References

External links

* [http://www.ancestry.co.uk/learn/library/article.aspx?article=1159 Genealogy Programmers Solve Y2K in 1958]
* [http://bitsavers.org/pdf/ibm/7090/F28-8043_CommercialTranslatorGenInfMan_Ju60.pdf IBM Commercial Translator General Reference Manual] (pdf, 8.2M) Page 87.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Cronología de los lenguajes de programación — Saltar a navegación, búsqueda Esta es una cronología de lenguajes de programación. Leyenda: ( Entrada ) significa un lenguaje de programación no universal * <AÑO> significa un lenguaje original (sin antecesor directo) Predecesor(es) Año… …   Wikipedia Español

  • Хронология языков программирования — Списки языков программирования По категориям Хронологический Генеалогический Хронология языков программирования  упорядоченный в хронологическом порядке список языков программирования. Содержание …   Википедия

  • Anexo:Cronología de los lenguajes de programación — Esta es una cronología de los lenguajes de programación. Leyenda: ( Entrada ) significa un lenguaje de programación no universal * <AÑO> significa un lenguaje original (sin antecesor directo) Predecesor(es) Año Nombre Desarrollador… …   Wikipedia Español

  • COBOL — For other uses, see COBOL (disambiguation). COBOL LANGUAGE Paradigm(s) procedural, object oriented Appeared in 1959 (1959) Designed by Grace Hopper, William Selden, Gertrude Tierney, Howard Bromberg, Howard Discount, Vernon Reeves, Jean E.… …   Wikipedia

  • Air Force Materiel Command — Infobox Military Unit unit name= Air Force Materiel Command caption= Air Force Materiel Command emblem dates= July 1992–Present country= United States branch= US Air Force type= Major Command role= Systems acquisition, research, development,… …   Wikipedia

  • COBOL — Paradigmen: Zunächst rein imperativ, später erweitert um Elemente der strukturierten, prozeduralen und heutzutage sogar objektorientierten Programmierung Erscheinungsjahr: 1959 Entwickler: Grace Hopper, William Selden, Gertrude Tierney, Howard… …   Deutsch Wikipedia

  • Cobol — Paradigmen: Zunächst rein imperativ, später erweitert um Elemente der strukturierten, prozeduralen und heutzutage sogar objektorientierten Programmierung Erscheinungsjahr: 1959 Entwickler: Grace Hopper, William Selden, Gertrude Tierney, Howar …   Deutsch Wikipedia

  • Chronologie Des Langages De Programmation — Voici une chronologie des langages de programmation. Sommaire 1 Avant 1950 2 Années 1950 3 Années 1960 4 Années 1970 …   Wikipédia en Français

  • Chronologie des langages de programmation — Voici une chronologie non exhaustive des langages de programmation. Sommaire 1 Avant 1950 2 Années 1950 3 Années 1960 4 Années 1970 …   Wikipédia en Français

  • Grace Hopper — Infobox Military Person name=Grace Murray Hopper born= birth date|1906|12|09 died= death date and age |1992|01|01|1906|12|09 placeofbirth=New York City, New York placeofdeath=Arlington, Virginia placeofburial= caption=Grace Hopper allegiance=… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”