Information Technology Reference
In-Depth Information
program-name
:
accttable
define
file
acctfile
record
account-record
status
acct-status
structure
account-number
integer(
9)
last-name
character
(18)
field
character
(58)
zip-code
integer(
5)
field
character
(10)
define
table
ziptable
source
prod.copylib(
ziptable
)
record
zip-record
key
zip
found
t-sub
structure
zip
integer
(5)
city
character
(15)
state
character
(2)
define
error-msg
character
(60)
value spaces
define
list-city
character
(15)
value spaces
define
list state
character
(2)
value spaces
screen erase
screen
(1,23) “account number inquiry with table”
screen
(4,20) “account number:”
screen
(6,20) “last name:”
screen
(8,20) “city:”
screen
(10,20) “state:”
screen
(12,20) “zip code:”
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
if
acct-status
= 0
perform
get-city-state
screen
(4,36)
account-number
screen
(6,36)
last-name
screen
(8,36)
list-city
screen
(10,36)
list-state
screen
(12,36)
zip-code
else
if
acct-status
= 5
screen
(24,20) “the account number “
account-number
“ is not on the file”
else
error-msg
= “account file read problem; program ending - press enter”
go to
end-program
end-if
end-if