Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: How to compare to values range

$
0
0
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.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>