IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

occurs-impossible in 01/77 why?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jeya Srinivasan

New User


Joined: 29 Oct 2003
Posts: 3

PostPosted: Wed Oct 29, 2003 3:13 pm
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
abdul

EXPERT


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

PostPosted: Thu Oct 30, 2003 8:56 am
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
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
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: 1592

PostPosted: Sat Nov 01, 2003 2:22 am
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Updating a 1 byte thats in occurs mul... DFSORT/ICETOOL 6
This topic is locked: you cannot edit posts or make replies. SYMNAMES using COBDFSYM for OCCURS cl... CLIST & REXX 12
No new posts ERROR - NO ESD ENTRIES, EXECUTION IMP... COBOL Programming 6
No new posts Multiple OCCURS depending on in same ... COBOL Programming 6
No new posts Syncsort - help needed with ICETOOL O... SYNCSORT 2
Search our Forums:

Back to Top