Q

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

Dig deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

SearchEnterpriseLinux

SearchDataCenter

Close