Title: Theory / Unimportant / CS / Programming / Cobol
Tags: récupéré seen_description FromInstruction hasNotNewEffectReturnsMeaning
On every note of this deck, unless a note says otherwise:
Page: http://www.csis.ul.ie/cobol/course/COBOLIntro.htm
Page: http://www.csis.ul.ie/cobol/course/COBOLIntro.htm

Name: COmmon Business Oriented Language
Abbreviation: COBOL

Name: bespoke software
Definition: Software made for a single task at a single company. Very few copy used
Name2: Vertical software market

Name: horizontal software
Definition: Software made for general use, with a low cost of replacement

Instruction: ACCEPT foo.
Effect: Ask user for a value, put it in variable foo
Language: COBOL

Instruction: MULTIPLY foo1 BY foo2 GIVING bar.
Effect: Put in variable bar the result of foo1*foo2
Language: COBOL

Instruction: DISPLAY foo_1, ..., foo_n.
Effect: Display the concatenation of the foo_i
Language: COBOL

Name: COBOL MetaLanguage
Definition: Uppercase correspond to reserved word
Context: COBOL
Definition2: Underlined words corresponds to mandatory words
Definition3: Not underline: onise words, used for readability and optional
Definition4: Words in mixed case represent names that must be devised by the programmer (like data item names).
Definition5: When material is enclosed in curly braces { }, a choice must be made from the options within the braces. If there is only one option then that item in mandatory.
Definition6: Material enclosed in square brackets [ ], indicates that the material is optional, and may be included or omitted as required.
Definition7: The ellipsis symbol ... (three dots), indicates that the preceding syntax element may be repeated at the programmer's discretion.

Name: COBOL MetaLanguage
Definition: Uppercase correspond to reserved word
Context: COBOL

Instruction: COMPUTE foo_1, ... foo_n = bar
Effect: Assign the value of bar to each foo_i
Language: COBOL

Instruction: ROUNDED
Effect: State that the variable should store the value rounded
Language: COBOL
Where to use it: After a variable in a computer

Name: Area A
Definition: Columns 8 to 11
Context: COBOL
Applied to3: Starting point of division names, section names, paragraph names, FD entries and 01 level numbers

Name: Area B
Definition: Columns 12 to 72
Context: COBOL

Name: User defined name
Definition: They must contain at least one character, but not more than 30 characters.
Context: COBOL
Definition2: They must contain at least one alphabetic character.
Definition3: They must not begin or end with a hyphen
Definition4: They must be constructed from the characters A to Z, the numbers 0 to 9, and the hyphen.
Definition5: They must not contain spaces.
Definition6: Names are not case-sensitive: TotalPay is the same as totalpay, Totalpay or TOTALPAY.

Name: Cobol program
Definition: A sequence of Division
Context: COBOL

Name: A division
Definition: block of code, usually containing one or more sections, that starts where the division name is encountered and ends with the beginning of the next division or with the end of the program text.
Context: COBOL

Name: A section
Definition: A block of code usually containing one or more paragraphs.
Context: COBOL
Extra: A section begins with the section name and ends where the next section name is encountered or where the program text ends.

Name: A paragraph
Definition: A block of code beginning by a name and made up of one or more sentences.
Context: COBOL

Name: A sentence
Definition: One or more statements and is terminated by a period.
Context: COBOL

Name: A statement
Definition: A COBOL verb and an operand or operands.
Context: COBOL

Instruction: foo SECTION.
Effect: Start a new section called foo
Language: COBOL
Intuition: A statement

Instruction: foo.
Effect: Start a new paragraph called foo
Language: COBOL
Intuition: A statement

Name: The four divisions
Definition: IDENTIFICATION
Context: Cobol
Definition2: Environment
Conjdef: In this order
Definition3: Data
Definition4: Procedure

Name: Identification division
Definition: supplies information about the program to the programmer and the compiler.
Conjdef: In this order

Name: Environment division
Definition: describe the environment in which the program will run.
Context: COBOL
Conjdef: In this order
Applied to3: isolate in one place all aspects of the program that are dependant upon a specific computer, device or encoding sequence.

Name: Data division
Definition: File section
Context: Cobol
Notation: M
Definition2: working-storage section
Conjdef: In this order
Definition3: [linkage section]
Definition4: [report section]
Applied to3: provides descriptions of the data-items processed by the program.

Name: Procedure division
Definition: code used to manipulate the data described in the DATA DIVISION

Instruction: PROGRAM-ID. foo.
Effect: Name used by the linker and CALL statement to refer to this program
Language: COBOL
Where to use it: IDENTIFICATION Division

Instruction: AUTHOR. foo.
Effect: States that the author of this program is foo
Language: COBOL
Where to use it: IDENTIFICATION Division

Name: file section
Definition: describe most of the data that is sent to, or comes from, the computer's peripherals.

Name: working-storage section
Definition: used to describe the general variables used in the program.