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

How many bytes does OCCURS occupy in this declaration


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

Active User


Joined: 22 Aug 2005
Posts: 411
Location: Colarado, US

PostPosted: Wed Nov 02, 2005 11:55 am
Reply with quote

Hi folks

Tell me like how many bytes does OCCURS occupy for the below definition.
Code:

05 emp-data  occurs 02 times.
  10 emp-data1 occurs 240 times.
     15  emp-count-m  pic s9(07) comp-3.
     15  emp-count-m  pic s9(07) comp-3.
Back to top
View user's profile Send private message
rohin

New User


Joined: 29 Apr 2005
Posts: 21
Location: Gurgaon, India

PostPosted: Wed Nov 02, 2005 4:57 pm
Reply with quote

Hi,
I think it will take 3840 bytes.
S9(7) comp-3 ---> 4 bytes
S9(7) comp-3 ---> 4 bytes
total: 8 bytes
grand total: 2*240*8 = 3840 bytes

Plz tell me if i m wrong.

Regards,
Rohin
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed Nov 02, 2005 5:05 pm
Reply with quote

Hi Rohin,

Thats a correct answer.

But can you please turn around?

I am sitting behind you.

Well, the world is really a very small place.
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 Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts Updating a 1 byte thats in occurs mul... DFSORT/ICETOOL 6
No new posts total number of bytes PL/I & Assembler 10
No new posts ICE039A H INSUFFICIENT MAIN STORAGE -... DFSORT/ICETOOL 3
No new posts converting bytes and megabytes to kil... SYNCSORT 4
Search our Forums:

Back to Top