COMTRAN

Last updated
COMTRAN
Developer Bob Bemer
First appeared1957 (1957)
Influenced by
FLOW-MATIC
Influenced
COBOL

COMTRAN (COMmercial TRANslator) is an early programming language developed at IBM. It was intended as the business programming 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.

Contents

Contributions to COBOL

Several elements of COMTRAN were incorporated into COBOL:

Picture clause

A picture clause element defines how a particular data item should be formatted, for output. It consists of a string of letters and digits. It is similar to the FORTRAN format specifier seen in the READ and WRITE statements, or the formatting strings seen in more modern languages like C. This became an important part of COBOL.

Sample program

This is a sample COMTRAN program, doing payroll calculations. [1]

 01001*PROCEDURE 01002CALL (EMPLOYEE.NUMBER)EMPLOYNO, 01003(BONDEDUCTION)BONDEDUCT, 01004(BONDENOMINATION)BONDENOM, 01005(BONDACCUMULATION)BONDACCUM, 01006(INSURANCE.PREM)INSPREM, 01007(RETIREMENT.PREM)RETPREM, 01008(DEPARTMENT.TOTAL)DPT. 01009START.OPENALLFILES. 01010GET.MASTER.GETMASTER,ATENDDOEND.OF.MASTERS. 01011GET.DETAIL.GETDETAIL,ATENDGOTOEND.OF.DETAILS. 01012COMPARE.EMPLOYEE.NUMBERS.GOTOCOMPUTE.PAYWHENDETAILEMPLOYNO 01013ISEQUALTOMASTEREMPLOYNO,LOW.DETAILWHENDETAIL 01014EMPLOYNOISLESSTHANMASTEREMPLOYNO. 01015HIGH.DETAIL.MOVE 'M'TOMASTERERRORCODE,FILEMASTERIN 01016ERROR.FILE. 01017GETMASTER,ATENDDOEND.OF.MASTERS. 01018GOTOCOMPARE.EMPLOYEE.NUMBERS. 02001LOW.DETAIL.MOVE 'D'TODETAILERRORCODE,FILEDETAILIN 02002ERROR.FILE. 02003GOTOGET.DETAIL. 02004END.OF.MASTERS.IFDETAILEMPLOYNO=HIGH.VALUETHENGOTO 02005END.OF.RUNOTHERWISESETMASTEREMPLOYNO=HIGH.VALUE. 02006END.OF.DETAILS.IFMASTEREMPLOYNO=HIGH.VALUETHENGOTO 02007END.OF.RUNOTHERWISESETDETAILEMPLOYNO=HIGH.VALUE,GO 02008TOCOMPARE.EMPLOYEE.NUMBERS. 02009END.OF.RUN.MOVECORRESPONDINGGRAND.TOTALTOPAYRECORD,FILE 02010PAYRECORD,CLOSEALLFILES. 02011STOP1234. 02012COMPUTE.PAY.IFDETAILHOURSISGREATERTHAN40 THENSETDETAIL 02013GROSS=(DETAILHOURS-40)*MASTERRATE*1.5. 02014SETDETAILGROSS=DETAILGROSS+MASTERRATE*40,DO 02015FICA.ROUTINE,DOWITHHOLDING.TAX.ROUTINE. 02016IFMASTERBONDEDUCTISNOTEQUALTOZEROTHENDO 02017BOND.ROUTINE. 02018DOSEARCHFORINDEX =1(1)12. 02019NET.SETPAYRECORDNETPAY=DETAILGROSS-DETAILFICA-DETAIL 02020WHT-DETAILRETIREMENT-DETAILINSURANCE-DETAIL 02021BONDEDUCT.

Related Research Articles

<span class="mw-page-title-main">COBOL</span> Programming language with English-like syntax

COBOL is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily used in business, finance, and administrative systems for companies and governments. COBOL is still widely used in applications deployed on mainframe computers, such as large-scale batch and transaction processing jobs. However, due to its declining popularity and the retirement of experienced COBOL programmers, programs are being migrated to new platforms, rewritten in modern languages or replaced with software packages. Most programming in COBOL is now purely to maintain existing applications; however, many large financial institutions were still developing new systems in COBOL as late as 2006.

<span class="mw-page-title-main">Fortran</span> General-purpose programming language

Fortran is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.

PL/I is a procedural, imperative computer programming language developed and published by IBM. It is designed for scientific, engineering, business and system programming. It has been used by academic, commercial and industrial organizations since it was introduced in the 1960s, and is still used.

<span class="mw-page-title-main">BOS/360</span> Early IBM System/360 operating system

Basic Operating System/360 (BOS/360) was an early IBM System/360 operating system.

In computer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language elements, be easier to use, or may automate significant areas of computing systems, making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.

In computer science, imperative programming is a programming paradigm of software that uses statements that change a program's state. In much the same way that the imperative mood in natural languages expresses commands, an imperative program consists of commands for the computer to perform. Imperative programming focuses on describing how a program operates step by step, rather than on high-level descriptions of its expected results.

Adabas, a contraction of “adaptable database system," is a database package that was developed by Software AG to run on IBM mainframes. It was launched in 1971 as a non-relational database. As of 2019, Adabas is marketed for use on a wider range of platforms, including Linux, Unix, and Windows.

<span class="mw-page-title-main">For loop</span> Control flow statement for repeated execution

In computer science a for-loop or for loop is a control flow statement for specifying iteration. Specifically, a for loop functions by running a section of code repeatedly until a certain condition has been satisfied.

In computer science, a record is a basic data structure. Records in a database or spreadsheet are usually called "rows".

<span class="mw-page-title-main">IBM 1130</span> 16-bit IBM minicomputer introduced in 1965

The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included a 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards. Fortran was the most common programming language used, but several others, including APL, were available.

In computing, a line number is a method used to specify a particular sequence of characters in a text file. The most common method of assigning numbers to lines is to assign every line a unique number, starting at 1 for the first line, and incrementing by 1 for each successive line.

In computer programming, a statement is a syntactic unit of an imperative programming language that expresses some action to be carried out. A program written in such a language is formed by a sequence of one or more statements. A statement may have internal components.

WATFIV, or WATerloo FORTRAN IV, developed at the University of Waterloo, Canada is an implementation of the Fortran computer programming language. It is the successor of WATFOR.

<span class="mw-page-title-main">IBM 7090/94 IBSYS</span> Early-to-mid 1960s operating system for the scientific line of IBM mainframes

IBSYS is the discontinued tape-based operating system that IBM supplied with its IBM 709, IBM 7090 and IBM 7094 computers. A similar operating system, also called IBSYS, was provided with IBM 7040 and IBM 7044 computers. IBSYS was based on FORTRAN Monitor System (FMS) and Bell Labs' "BESYS" rather than the SHARE Operating System. IBSYS directly supported several old language processors on the $EXECUTE card: 9PAC, FORTRAN and IBSFAP. Newer language processors ran under IBJOB.

AIMACO is an acronym for AIr MAterial COmpiler. It began around 1959 as the definition of a high level programming language influenced by the FLOW-MATIC language, developed by UNIVAC, and the COMTRAN programming language, developed by IBM. AIMACO, along with FLOW-MATIC and COMTRAN, were precursors to the COBOL programming language and influenced its development.

This comparison of programming languages compares the features of language syntax (format) for over 50 computer programming languages.

FACT is an early discontinued computer programming language, created by the Datamatic Division of Minneapolis Honeywell for its model 800 series business computers in 1959. FACT was an acronym for "Fully Automatic Compiling Technique". It was an influence on the design of the COBOL programming language.

The OS/360 Object File Format is the standard object module file format for the IBM DOS/360, OS/360 and VM/370, Univac VS/9, and Fujitsu BS2000 mainframe operating systems. In the 1990s, the format was given an extension with the XSD-type record for the MVS Operating System to support longer module names in the C Programming Language. This format is still in use by the z/VSE operating system. In contrast, it has been superseded by the GOFF file format on the MVS Operating System and on the z/VM Operating System. Since the MVS and z/VM loaders will still handle this older format, some compilers have chosen to continue to produce this format instead of the newer GOFF format.

The GOFF specification was developed for IBM's MVS operating system to supersede the IBM OS/360 Object File Format to compensate for weaknesses in the older format.

References

Further reading