Ask the Expert

Data-name-1 must within the range

In COBOL/400 OCCURS integer-1 TO integer-2 TIMES DEPENDING ON data-name-1. The book said that the data-name-1 must within the range of integer-1 thru integer-2. What if integer-1 is 200 and integer-2 is 999 and data-name-1 is 10. What will happen? Is it predictable or unpredictable? One of our programmers coded like this, but when we tested it was working fine.

In some releases, it will work fine because the system will check to see that data-name-1 is not greater than integer-2. There is no assurance that it will work on previous, or subsequent releases.

This was first published in April 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: