I believe there's no problem doing this. AcuCOBOL accepts this definition and I cannot see any limitation on this in the COBOL documentation I have handy.
It is a rather odd situation where you would not want this table to be subordinate to another data name (for instance, to INITIALIZE the table).
I am not familiar with AcuCOBOL so I cannot comment on it being OK as far as containing an OCCURS clause in the 01 level data definition; but I will agree that is rather odd!
My question however is: can you not define a table under a 01-level (and said table is the only item under said 01-level) and then INITIALIZE the 01-level dataname?
I've seen a couple of compilers that will accept this, but recommend you avoid coding OCCURS on the 01, because it is not standard, and therefore not portable. Betty Scherber
Brainbench MVP for COBOL II
"My question however is: can you not define a table under a 01-level (and said table is the only item under said 01-level) and then INITIALIZE the 01-level dataname?"
That was rhetorical question... I knew perfectly well the answer to it. That is why you'd note that it was addressed not to the originator of the thread, rather to someone who was attempting an answer and who, in his post said the following:
'It is a rather odd situation where you would not want this table to be subordinate to another data name (for instance, to INITIALIZE the table).'
Hence the rhetorical question where I implicitly mean that one can INDEED define a table subordinate to a 01-level and then initialize said 01 level!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.