identification division.
program-id. lab1-scope.
*
the lab1
program will be used
here to test scope terminators.
*
currently, all periods in the procedure
division are deleted
except
*
the required ones... end of division and
paragraph names as
well as
*
the one at the end of the paragraph. be sure to change
the program
*
back to its
original form before going on to the next question...
*
*
the questions are, what happens if you:
*
1. delete the
end-perform?
*
2. delete the
first
end-read?
*
3. delete the
second
end-read?
*
4. put a period
instead
of the end-perform?
*
5. put a period
instead
of both the end-read and end-perform?
*
6. put a period
after
the second end-read?
*
7. put a period
after
the end-perform?
*
the rest of the program is here… you can
access it at
*
/usr/class/cis314/scope.cob
procedure division.
100-main-module.
open input employee-data
output payroll-listing
write print-rec
from page-header
before advancing 0 lines
write print-rec
from
column-headers
after advancing 2 line
write print-rec
from under-line
after advancing 1 lines
read employee-data
at end move "no" to
are-there-more-records
end-read
perform
until are-there-more-records = "no"
move spaces to print-rec
move employee-name-in to name-out
move hours-worked-in to hours-out
move hourly-rate-in to rate-out
multiply hours-worked-in by
hourly-rate-in
giving
weekly-wages-out
write print-rec
read employee-data
at end move "no" to
are-there-more-records
end-read
end-perform
close employee-data payroll-listing
stop run.