Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
occurs-impossible in 01/77 why?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
Jeya Srinivasan

New User


Joined: 29 Oct 2003
Posts: 3

PostPosted: Wed Oct 29, 2003 3:13 pm    Post subject: occurs-impossible in 01/77 why?
Reply with quote

Why occurs is not allowed with elementary items at 01 or 77 level?
Back to top
View user's profile Send private message
References
PostPosted: Wed Oct 29, 2003 3:13 pm    Post subject: Re: occurs-impossible in 01/77 why? Reply with quote

abdul

EXPERT


Joined: 28 Jul 2003
Posts: 23
Location: Bangalore,India

PostPosted: Thu Oct 30, 2003 8:56 am    Post subject:
Reply with quote

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
View user's profile Send private message
Jeya Srinivasan

New User


Joined: 29 Oct 2003
Posts: 3

PostPosted: Thu Oct 30, 2003 9:47 am    Post subject:
Reply with quote

HI abdul,
thanks.Now i got a clear idea about that.

cheers
jeya
Back to top
View user's profile Send private message
abdul

EXPERT


Joined: 28 Jul 2003
Posts: 23
Location: Bangalore,India

PostPosted: Thu Oct 30, 2003 9:51 am    Post subject:
Reply with quote

Hi,

Nice to hear that my reply was helpful for you....


Thanks
Abdul[/quote]
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1474

PostPosted: Sat Nov 01, 2003 2:22 am    Post subject:
Reply with quote

I guess one answer is "because IBM says so icon_smile.gif ", 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1