Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What's the size of the variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: What's the size of the variable
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    Post subject: re: output of the code
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    Post subject: Re: Please tell me the output
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    Post subject:
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    Post subject: Hi,
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Increase the screen size after split mistah kurtz TSO/ISPF 2 Fri Sep 02, 2016 6:39 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us