Is it possible to compare to a range of values in COBOL? I'm thinking of something like this:
if account-id between 1 and 7 then
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
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.