Cobol Language Fundamentals: Structured COBOL Programming, Stern & Stern, 9th Ed Ition
Cobol Language Fundamentals: Structured COBOL Programming, Stern & Stern, 9th Ed Ition
Cobol Language
Fundamentals
• MARGIN RULES
1. Division, section, and paragraph-
names begin in Area A.
2. All other statements, clauses,
and sentences begin in Area B.
Solution: IDENTIFICATION;
ENVIRONMENT;
DATA;
PROCEDURE
Structured COBOL Programming, Stern & Stern, 9th Ed
ition
SELF-TEST
Solution: B
SOURCE-COMPUTER:
– The computer that will be used for compiling
the program.
OBJECT-COMPUTER:
- The computer that will be used for executing
or running the program.
* SOURCE- COMPUTER and OBJECT-COMPUTER
are coded primarily as documentation entries.
• A SELECT statement
– defines a file-name.
– assigns a device name to that file*.
A file is the major collection of data for a
given application.
SELECT file-name-1
ASSIGN TO implementor-name-1
[ORGANIZATION IS LINE SEQUENTIAL]
– The implementor-name is a machine-
dependent device specification that is typically
provided by the computer center.
File-Name Rules
1. The file-name assigned to each
device must conform to the rules for
forming user-defined words.
2. A user-defined word is a word
chosen by the programmer to
represent some element in a
program such as a file-name:
Structured COBOL Programming, Stern & Stern, 9th Ed
ition
OVERALL FORMAT
• Rules for Forming User-Defined Words
(Such as File-Names)
1. 1 to 30 characters.
2. Letters, digits, and hyphens (-) only.
3. No embedded blanks
– It is best to use hyphens to separate words
(e.g., EMPLOYEE-NAME)
CHAPTER SUMMARY
COMES NEXT