Information Technology Reference
In-Depth Information
define
work-date
character
(8)
define
record-counter
integer(
5)
value
0
define
page-counter
integer(
3)
value
0
define
line-counter
integer(
2)
value
54
define
error-msg
character
(60)
value
spaces
work-date
=
date
print-month
=
work-date
(5:2)
print-day
=
work-date
(7:2)
print-year
=
work-date
(3:2)
account-number
= 9
read-file:
readnext
acctfile
record-counter
=
record-counter
+ 1
if
acct-status
= 0
print-account-number
=
account-number
print-last-name
=
last-name
print-first-name
=
first-name
print-middle-initial
=
middle-initial
print-street-address
=
street-address
print-city
=
city
print-state
=
state
print-zip-code
=
zip-code
print-balance
=
balance
line-counter
=
line-counter
+ 1
if
line-counter
> 54
perform
print-headings
end-if
print
print-line
go to
read-file
else
if
acct-status
not = 9
error-msg
= “There was a problem with the account file”
end-if
end-if
go to
end-program
print-headings:
page-counter
=
page-counter
+ 1
page-number
=
page-counter
line-counter
= 5
print page
main-heading
print skip
(2)
sub-heading
print skip
end-program:
record-counter
=
record-counter
- 1
print skip
(2) „the number of records read was ‟
record-counter
print skip
error-msg
end