Problem solve Get help with specific problems with your technologies, process and projects.

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.

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.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.