View previous topic :: View next topic
|
Author |
Message |
Jeya Srinivasan
New User
Joined: 29 Oct 2003 Posts: 3
|
|
|
|
Why occurs is not allowed with elementary items at 01 or 77 level? |
|
Back to top |
|
 |
abdul
EXPERT
.jpg)
Joined: 28 Jul 2003 Posts: 23 Location: Bangalore,India
|
|
|
|
Hi,
OCCURS clause is used for specifying multiple occurance of fields in a record. Its not for RECORDs. Hence cannot be used with 01 level.
In case of 77 level we cannot have sublevels under it. So there is no qn
of multiple occurance of fields.
Thanks
Abdul |
|
Back to top |
|
 |
Jeya Srinivasan
New User
Joined: 29 Oct 2003 Posts: 3
|
|
|
|
HI abdul,
thanks.Now i got a clear idea about that.
cheers
jeya |
|
Back to top |
|
 |
abdul
EXPERT
.jpg)
Joined: 28 Jul 2003 Posts: 23 Location: Bangalore,India
|
|
|
|
Hi,
Nice to hear that my reply was helpful for you....
Thanks
Abdul[/quote] |
|
Back to top |
|
 |
mmwife
Super Moderator

Joined: 30 May 2003 Posts: 1592
|
|
|
|
I guess one answer is "because IBM says so ", but it looks like all suppliers of the COBOL compiler have the same limitation.
My guess is that 01 and 77 levels are aligned on a doubleword boundary (they were at one time - 77 levels my not be anymore) and, depending on the length of the 01/77 level the entries created by the OCCURS may not "map" to the definition because of the slack bytes added by 01/77 levels.
Regards, Jack. |
|
Back to top |
|
 |
|