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

What's the size of the variable


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

New User


Joined: 28 Apr 2006
Posts: 3

PostPosted: Fri Jun 02, 2006 3:22 pm
Reply with quote

Hi friends,
what is the size of 01 wrec.
01 wrec.
02 filler pic x.
02 a pic 9v999.
02 b redefines a pic xx.
02 c pic s9(6) comp3.

This was asked in written test for EDS.
Back to top
View user's profile Send private message
manisha-s
Warnings : 1

New User


Joined: 22 May 2006
Posts: 13

PostPosted: Fri Jun 02, 2006 4:15 pm
Reply with quote

answer is 11
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Jun 02, 2006 4:21 pm
Reply with quote

Hi ,

i guess it takes '9' bytes because
redefine clause doesnt take new space
it would use same space .

eg:
01 wrec.
02 filler pic x.
02 a pic 9v999.
02 b redefines a pic xx.
02 c pic s9(6) comp3.

in this case
there will be no new allocation of memmory
it means that 'b' starts pointing to the starting space allocated to 'a'

plz do correct me if u find me wrong .

Thanks ,
Kapil.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri Jun 02, 2006 7:14 pm
Reply with quote

@hikaps14,
You are spot on.
Even I think that it will take 9 bytes.

ap_mainframes
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Sun Jun 04, 2006 4:32 pm
Reply with quote

Hi mahithegenius,

It will takes 9 bytes only...bcz of redefines does not allocates extra memorey...


Any other questions from EDS.....pls Recall all those questions
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
Search our Forums:

Back to Top