, originally known as B-0, is possibly the first English-like Data Processing
language. It was invented and specified by Grace Hopper
, and development of the commercial variant started at Remington Rand
in 1955 for the UNIVAC I
. By 1958, the compiler
and its documentation were generally available and being used commercially.
Contributions to COBOL
Flow-Matic was a major influence in the design of COBOL
Several elements of Flow-Matic were incorporated into COBOL:
- Defining Files in advance, and separating into INPUT and OUTPUT files.
- Qualification of data-names (IN or OF clause).
- IF END OF DATA (AT END) clause on file READ operations.
- Figurative constant ZERO (originally ZZZ...ZZZ, where number of Z's indicated precision).
- Dividing the program into sections, separating different parts of the program. Flow-Matic sections included Computer (Environment Division), Directory (Data Division), and Compiler (Procedure Division).
A sample FLOW-MATIC program
(See text below.)
0) INPUT INVENTORY FILE=A
OUTPUT PRICED-INV FILE=C
1) COMPARE PRODUCT-NO(A) WITH PRODUCT-NO(B)
IF GREATER GO TO OPERATION 10;
IF EQUAL GO TO OPERATION 5;
OTHERWISE GO TO OPERATION 2.
2) TRANSFER A TO D.
3) WRITE ITEM D.
4) JUMP TO OPERATION 8.
5) TRANSFER A TO C.
6) MOVE UNIT-PRICE(B) TO UNIT-PRICE(C).
7) WRITE ITEM C.
8) READ ITEM B; IF END OF DATA GO TO OPERATION 12.
9) JUMP TO OPERATION 1.
10) READ ITEM B; IF END OF DATA GO TO OPERATION 12.
11) JUMP TO OPERATION 1.
12) SET OPERATION 9 TO GO TO OPERATION 2.
13) JUMP TO OPERATION 2.
14) TEST PRODUCT-NO(B) AGAINST ZZZZZZZZZZZZ;
IF EQUAL GO TO OPERATION 16;
OTHERWISE GO TO OPERATION 15.
15) REWIND B.
16) CLOSE-OUT FILES C, D.
17) STOP. (END)