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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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