Information Technology Reference
In-Depth Information
zip-code integer( 5)
field character (10)
define file zipfile record zip-record status zip-status key zip structure
zip character (9)
city character (15)
state character (2)
define error-msg character (60) value spaces
screen erase
screen (1,26) “Sly‟s account number inquiry”
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) city
screen (10,36) state
screen (12,36) zip-code
else
if acct-status = 5
screen (24,20) “the account # “ 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
go to input-number
get-city-state: zip = zip-code
city = spaces
state = spaces
read zipfile
if zip-status = 5
screen (24,20) “that zip code ” zip “ is not on the file”
else
Search WWH ::




Custom Search