Here's another technique, a little closer to your original request: 01 account-id pic 9. 88 account-id-valid values are 1 through 7. if account-id-valid then perform debit-internal-account else perform debit-customer-account end-if If you do it with 88's, then the semantics of the test is only one place in your code, rather than being spread through out the procedure division. Then, when you decided to add 8 to the valid values, you only have to change one place.
↧