Information Technology Reference
In-Depth Information
screen
(22,36) “enter xx for last name to exit”
input-data:
valid-input
= 0
perform
input-last-name
until
valid-input
= 1
valid-input
= 0
perform
input-first-name
until
valid-input
= 1
valid-input
= 0
perform
input-middle-initial
until
valid-input
= 1
perform
call-process
go to
input-data
input-last-name:
screen
(10,36)
input
in-last-name
screen
(24,1)
erase
if
in-last-name
= “xx”
go to
end-program
end-if
if index
(
in-last-name
,
name-string
) = 1
valid-input
= 1
else
screen
(24,20) “invalid characters in the last name - try again”
end-if
input-first-name:
screen
(15,36)
input
in-first-name
screen
(24,1)
erase
if index
(
in-first-name
,
name-string
) = 1
valid-input
= 1
else
screen
(24,20) “invalid characters in the first name - try again”
end-if
input-middle-initial:
screen
(20,36)
input
in-middle-initial
screen
(24,1)
erase
if
in-middle-
initial =
space
or (>= “A” and <= “Z”) or (>= “a” and <= “z”)
valid-input
= 1
else
screen
(24,20) “invalid character in the middle initial - try again”
end-if
call-process:
call
nextnumb
using
data-fields
if
process-sw
= 0
account-number
=
new-account-number
last-name
=
in-last-name
first-name
=
in-first-name
middle-initial
=
in-middle-initial
field1
=
spaces
zip-code
= 0
balance
= 0
perform
write-record
else