project:cobol:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
project:cobol [2016/11/24 21:34] – maxfx | project:cobol:start [2018/10/06 17:08] (current) – removed maxfx | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== COBOL ====== | ||
- | {{template> | ||
- | name=Cobol|image=cobol_report_apr60.jpg? | ||
- | |||
- | |||
- | On May 28 and 29 of 1959 (exactly one year after the Zürich ALGOL 58 meeting), a meeting was held at the Pentagon to discuss the creation of a common programming language for business. It was attended by 41 people and was chaired by Phillips.The Department of Defense was concerned about whether it could run the same data processing programs on different computers. FORTRAN, the only mainstream language at the time, lacked the features needed to write such programs. | ||
- | COmmon Business Oriented Language (COBOL) is a programming language that resembles English. As its name suggests, COBOL is especially efficient for | ||
- | processing business problems. It emphasizes describing and handling data items and input/ | ||
- | |||
- | |||
- | ====== COBOL Nowadays ===== | ||
- | Cobol is said to be dead. | ||
- | |||
- | |||
- | ====== IBM COBOL, ILE COBOL ====== | ||
- | IBM Cobol is for AS400 machine and for ZOS mainframe. | ||
- | This is example code with call AS400 API for dump memmory in ILE COBOL. | ||
- | < | ||
- | | ||
- | | ||
- | | ||
- | COPY DUMP_FULL. | ||
- | 77 BOOL-1 PIC 1 INDICATOR 61 VALUE B" | ||
- | 01 BOOL-ARRAY. | ||
- | 08 BOOL-2 OCCURS 10 PIC 1 VALUE B" | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | MOVE B" | ||
- | MOVE B" | ||
- | | ||
- | CALL LINKAGE IS PROCEDURE " | ||
- | OMITTED, OMITTED, | ||
- | OMITTED, PROGRAM-TYPE, | ||
- | DUMP-TYPE, ERROR-CODE | ||
- | </ | ||
- | |||
- | ====== OpenCOBOL (GNUCOBOL) ====== | ||
- | Open source variant and crossplatform cobol for PC. | ||
- | This is example in OpenCOBOL on PC. Program shows date and time. | ||
- | < | ||
- | ****************************************************************** | ||
- | * Author: Maxfx | ||
- | * Date: 13/10/2016 | ||
- | ****************************************************************** | ||
- | | ||
- | | ||
- | DATA DIVISION. | ||
- | FILE SECTION. | ||
- | | ||
- | 01 W-T PIC S9(8). | ||
- | 01 W-D PIC S9(8). | ||
- | 01 W-BATCH-COMPLET PIC X(16). | ||
- | 01 W-BATCH-TEST PIC X(16). | ||
- | 01 W-BATCH. | ||
- | 03 W-DATE PIC X(8). | ||
- | 03 W-TIME PIC X(8). | ||
- | |||
- | |||
- | | ||
- | | ||
- | ACCEPT W-TIME OF W-BATCH FROM TIME. | ||
- | ACCEPT W-DATE OF W-BATCH FROM DATE YYYYMMDD. | ||
- | DISPLAY W-TIME OF W-BATCH. | ||
- | DISPLAY W-DATE OF W-BATCH. | ||
- | DISPLAY " | ||
- | |||
- | STRING W-DATE OF W-BATCH DELIMITED BY SPACE | ||
- | W-TIME OF W-BATCH DELIMITED BY SPACE | ||
- | INTO W-BATCH-COMPLET | ||
- | END-STRING. | ||
- | |||
- | MOVE W-BATCH TO W-BATCH-TEST. | ||
- | |||
- | DISPLAY " | ||
- | DISPLAY "TEST : " W-BATCH-TEST | ||
- | |||
- | STOP RUN. | ||
- | END PROGRAM DATE-AND-TIME. | ||
- | </ | ||
- | |||
- | |||
- | More code examples for [[https:// |
project/cobol/start.1480023266.txt.gz · Last modified: 2016/11/24 21:34 by maxfx