Information Technology Reference
In-Depth Information
To change the first name, enter 1. To update last name, enter 2 and enter 3 to
update the account balance. Entering 0 will give you the opportunity to enter another
account number. The new program will now turn into the following:
program-name : acctupd
define fil e acctfile record account-record status acct-status key account-number structure
account-number integer( 9)
last-name character (18)
first-name character (15)
middle-initial character
street-address character (25)
city character (15)
state character (2)
zip-code integer( 5)
balance signed decimal (6.2)
define name-string structure
field character (26) value “ABCDEFGHIJKLMNOPQRSTUVWXYZ”
field character (30) value “abcdefghijklmnopqrstuvwxyz „-.”
define field-no integer
define valid-input integer
define update-switch integer
define new-last-name character (18)
define new-first-name character (15)
define new-balance signed decimal (6.2)
define error-msg character (60) value spaces
screen erase
screen (1,25) “Account number inquiry / update”
screen (3,20) “account number:”
screen (5,17) “1. last name:”
screen (7,17) “2. first name:”
screen (9,20) “middle initial:”
screen (11,20) “street address:”
screen (13,20) “city:”
screen (15,20) “state:”
screen (17,20) “zip code:”
s creen (19,17) “3. balance:”
input-number: screen (21,1) erase
screen (21,1) “enter the account number or 0 to exit”
screen (3,36) input account-number
screen (24,1) erase
if account-number = 0
go to end-program
end-if
read acctfile
Search WWH ::




Custom Search