Information Technology Reference
In-Depth Information
screen
(6,20) “last name:”
screen
(8,20) “first name:”
screen
(10,20) “middle initial:”
screen
(12,20) “street address:”
screen
(14,20) “city:”
screen
(16,20) “state:”
screen
(18,20) “zip code:”
screen
(20,20) “account balance:”
screen
(22,20) “to exit, enter 0 for the account number”
input-number:
input
(4,36)
account-number
screen
(24,1)
erase
if
account-number
= 0
go to
end-program
end-if
read
acctfile
key
account-number
if
acct-status
= 0
screen
(4,36)
account-number
screen
(6,36)
last-name
screen
(8,36)
first-name
screen
(10,36)
middle-initial
screen
(12,36)
street-address
screen
(14,36)
city
screen
(16,36)
state
screen
(18,36)
zip-code
screen
(20,36)
balance,
mask
($$$$,$$9.99-)
else
if
acct-status
= 5
screen
(24,20) “The account # “
account-number
“ is not on the file.”
else
error-msg
= “Problem with the account file; program ending - press enter”
go to
end-program
end-if
end-if
go to
input-number
end-program:
screen
(24,1)
erase screen
(24,20)
error-msg
input
end
Some of the statements should be familiar to you. Note first that the title of the
account number inquiry program is
acctinq
and our second statement
define
file
acctfile
record
account-record
status
acct-status
key
account-number
structure
introduces the keyword