English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I've been trying to unravel a 35 year-old COBOL program and there's a couple of instances where arrays are declared with an OCCURS 1 clause. To me this doesn't make any sense, especially as these arrays appear to have more than one entry.

I've tried the manual and the internet, but cannot find anything that helps.

Is this a special instanmce of the OCCURS clause?

2006-09-13 00:47:06 · 3 answers · asked by Mad Professor 4 in Computers & Internet Programming & Design

3 answers

If this declaration is in linkage section or file section then the answer is obvious.

Older programs did not have the Array out of bounds error!
Thus declaring and Array with one occurance is saying that you don't know how many occurances the array has.
There should be other variables in place to identify the number of occurences in the Array.

2006-09-13 01:32:24 · answer #1 · answered by AnalProgrammer 7 · 0 0

It could be the programmer was used to building arrays and had to build one that had a 'one to many' relationship and rather than figure out the best way to program it, used his array technique for both the one and the many segments...

2006-09-13 00:50:31 · answer #2 · answered by Andy FF1,2,CrTr,4,5,6,7,8,9,10 5 · 0 0

Its not a OCCURS 1 TO N Depending on , is it?
or
maybe it it just a one dimensional array.

2006-09-13 00:56:49 · answer #3 · answered by John S 4 · 0 0

fedest.com, questions and answers