Information Technology Reference
In-Depth Information
zip-code integer( 5)
field character (10)
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)
sort acctfile ascending zip-code last-name first-name middle-initial into sorted-record
if sort-status > 0
error-msg = “sort problem - program ending”
go to end-program
end-if
account-number = 0
read-file: readnext sortfile
if sort-status = 0
record-counter = record-counter + 1
print-account-number = account-number
print-last-name = last-name
print-first-name = first-name
print-middle-initial = middle-initial
print-zip-code = zip-code
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 - program ending”
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
Search WWH ::




Custom Search