Information Technology Reference
In-Depth Information
error-msg = “Problem with the account file; program ending - press enter”
and no else statements would have been necessary.
There is one other difference from the first program and that is
balance, mask ($$$$,$$9.99-) .
The minus sign allows for negative numbers to be displayed. For a negative balance, the
sign prints to the right of the second decimal digit. If the amount is positive, no sign will
print. The negative sign is printed on the right because we have the dollar sign on the left.
A new field is defined by a new keyword in the line
define error-msg character (60) value “ ”
which says the field is sixty spaces, even though you only see one. This is the same as
define error-msg character (60) value “ ” .
At the end of the program, that error message is printed. If everything went smoothly, we
just print nothing on line 24. Otherwise, an error message is moved to the message and it
will be displayed at program's end. The error message will remain on the screen until the
operator presses enter .
That is the entire screen program to inquire on accounts and if you think that it is
complicated, it does get involved but there are some systems where the whole process is
even more confusing. Some methods of getting data to the screen involve escape
sequences, which are quite different and mind-boggling until you get used to them. If
you're not familiar with them, you may want to leave for another job. Our language is
intended to instruct without being confusing but there will be topics that have some
degree of difficulty and unfortunately they just can't be avoided.
As promised, I offer my thoughts on going paperless. A few years ago while on a
contract at a major bank, I saw a report - I forget how often it came out - that used over a
box of paper. Strangely, the accompanying summary report was even longer. The
requester probably had a few shares of Georgia-Pacific stock. No one said banks were
dispensers of sanity. As you can tell, I care for the earth and prefer the paperless route, but
not completely. My experience with the backup files of a previous chapter should have
convinced you of that. A balance is needed, because of all the possibilities. Our friend
Murphy may be lurking somewhere.
Having worked at over a half-dozen software contracts at banks over the years, I
saw that those institutions documented everything to death. In the summer of 2011, I
needed some documents from a local bank on a few investments. They went back less
than six years. The bank found some but not all of what I requested. I was confused and
thought that if accounts needed to be purged, they could have been printed out and stored,
with an index of the account numbers on some kind of storage disk. The latter would
point to the location of each account number. Apparently, I never considered the fire that
destroyed the paper stuff, rendering the related disk worthless. Now we know why our
parents hid money in out-of-the-way places in their home, so no one could find it, not
even their children - ever.
Search WWH ::




Custom Search